New code for primality testing

Marco Bodrato bodrato at mail.dm.unipi.it
Wed Nov 21 00:58:47 UTC 2018


Ciao,

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
https://gmplib.org/repo/gmp/file/17707/mpn/generic/strongfibo.c#l69

Ĝis,
m

-- 
http://bodrato.it/papers/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lucasLehmer.c
Type: text/x-csrc
Size: 4199 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-devel/attachments/20181121/b87f16be/attachment.bin>


More information about the gmp-devel mailing list