question on obtaining modulo values quickly

Randall Rathbun randallrathbun at protonmail.com
Wed Mar 9 21:32:02 CET 2022


Can anyone show by example, how the remainders or % is done quickly, using addition for the values of 9,5,7, 13, 17, and 97 as is used for the perfect square check routine?

It is easy to take mod 256 by looking at the last 8 bits of the number, but looking at the
asm code for mod_34lsub1.txt does not make this obvious to me.

Randall


More information about the gmp-discuss mailing list