Any advice on computing 2^n modulo m for MANY values of m, m is 64-bit, n is <10000 say

paul zimmermann Paul.Zimmermann at inria.fr
Sat Mar 21 13:12:16 UTC 2020


       Dear Marco,

> There is a portion of code in the current development library for the 
> very special case base=2 and size of m limited to one limb:
> 
> https://gmplib.org/repo/gmp/file/a1bfb342ebe9/mpn/generic/powm.c#l268
> 
> If you have further suggestions, I'll be happy to know !-)

this is great! Do you plan to put some mpn_redc functions in the public
interface? This would be very useful for applications like GMP-ECM.

Paul


More information about the gmp-discuss mailing list