Miller-Rabin pseudo-primality test (was: Debugging support for clojure?)

2009-03-12 Thread Tassilo Horn
Mark Engelberg mark.engelb...@gmail.com writes: Hi Mark, For number theory you often need things like    (mod (expt n exp) m) Yes, and to make things like this fast, the trick is to perform the mod at each multiplication step, rather than waiting until the end. So now I added this

Re: Miller-Rabin pseudo-primality test (was: Debugging support for clojure?)

2009-03-12 Thread Jerry K
On Mar 12, 2:45 pm, Tassilo Horn tass...@member.fsf.org wrote: Mark Engelberg mark.engelb...@gmail.com writes: Hi Mark, For number theory you often need things like    (mod (expt n exp) m) Yes, and to make things like this fast, the trick is to perform the mod at each multiplication