mini-gmp: mpz_congruent_p and mpz_probab_prime_p

Niels Möller nisse at lysator.liu.se
Thu Mar 6 18:07:44 UTC 2014


bodrato at mail.dm.unipi.it writes:

> I agree with your analysis: with the suggested change the same answer is
> given. Earlier, at no extra cost, I say.
> The same comment applies to the current implementation in the main library.

I think there's some value in using precisely the same tests as in
standard text books, and that it's a very unlikely case that the number
under test is a power of the (more or less random) base. Doesn't matter
very much, but I think I'd slightly prefer the code as is.

I have checked it in now, slightly simplified compared to the latest patch I
mailed here.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list