_mp_alloc vs ALLOC

bodrato at mail.dm.unipi.it bodrato at mail.dm.unipi.it
Mon Jun 4 19:40:11 CEST 2012


Il Lun, 4 Giugno 2012 6:32 pm, Torbjorn Granlund ha scritto:
> Pedro Gimeno <p.gimeno at formauri.es> writes:

>   Also, I seem to remember there were plans to make a new version of
>   mpz_nextprime accepting a random state and the number of M-R tests, and
>   of mpz_probab_prime_p accepting a random state. Of course, these could
>   just be new functions.
> I think new functions would be best, with old ones kept for
> compatibility.

IIRC someone proposed to change the meaning of the second argument of
mpz_probab_prime_p. Now it is documented as "reps controls how many
[Miller-Rabin] tests are done". It should be something like "logprob
controls the likeliness of a wrong answer, the function will return
probably prime for a composite with a probability of 1 over 2^logprob".



More information about the gmp-devel mailing list