New code for primality testing

Marco Bodrato bodrato at
Wed Nov 21 00:58:47 UTC 2018


Il Mar, 20 Novembre 2018 10:34 pm, Adrien Prost-Boucle ha scritto:
> Mostly "use" existing mpz functions to reach a proof of concept,

> ... and I only finished the Lucas-Lehmer test for Mersenne numbers xD

> As you also suggested, a demo program would be a more appropriate.

To exploit the very special form of Mersenne's numbers, mpn are more
powerful I think.
Look at the attached source. It uses the same logic I implemented for the
function mpn_llriter in


-------------- next part --------------
A non-text attachment was scrubbed...
Name: lucasLehmer.c
Type: text/x-csrc
Size: 4199 bytes
Desc: not available
URL: <>

More information about the gmp-devel mailing list