testing value of last digit of an integer.

Alexander Kruppa alexander.kruppa at stud.tu-muenchen.de
Sun Apr 4 21:06:35 CEST 2004


 >[...]

Speaking of computing residues for small moduli m, does GMP have code to 
quickly compute residues if 2^GMP_NUMB_BITS == +/-1 (mod m), by 
computing the (alternating) sum of limbs and doing the modulo on that? 
I'll need a fast (mod 3) for a Toom-Cook variant, is there a function to 
quickly compute the sum of limbs already in there somewhere?

Thanks,
Alex


More information about the gmp-discuss mailing list