Efficient (HUGE) prime modulus

Paul Rubin http
Tue Nov 20 08:49:45 CET 2007

blaine <frikker at gmail.com> writes:
> As an alternative I
> can use Java - but I'd rather have a pure python implementation. 

A number of people have suggested using 3-argument pow, but if this is
supposed to be a learning exercise, I think it's worth figuring out
for yourself how 3-argument pow is implemented in terms of ordinary
arithmetic.  I'll leave it as a hint: the simplest approach is
probably recursive.

More information about the Python-list mailing list