mpz_probab_prime_p reproducibility

Torbjörn Granlund tg at
Wed Nov 16 17:50:27 UTC 2016

Pierre Chatelier <pierre at> writes:

  I think that indeed, the *results* are the same (the contrary would be
  a real problem), but not the execution.

I'd love to grasp the logic behind that reasoning. :-)

  The set of miller rabin tests seems not to be the same for two
  consecutive calls, since there is the
  mpz_urandomm (x, rstate, nm3) part (and that no deterministic seed
  seems to be used for the randstate)
I suggest that you add some printing to the code before you insist on
your interpretation.  (I suppose we could clarify the manual about
initial state of gmp_randstate_t.)

Please encrypt, key id 0xC8601622

More information about the gmp-discuss mailing list