[prev in list] [next in list] [prev in thread] [next in thread]
List: gmp-discuss
Subject: mpz_probab_prime_p reproducibility
From: pierre () chachatelier ! fr (Pierre Chatelier)
Date: 2016-11-16 21:29:55
Message-ID: 9C66F327-990A-4EC8-9C0A-897239A7B352 () chachatelier ! fr
[Download RAW message or body]
Hello,
> > 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. :-)
It makes perfect sense for me but under the light of what follows, I just fooled \
myself.
> > 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.)
Aaaaaannnd obviously you are right.
I checked that gmp_randinit_default() performs a non-documented, but definitely not \
undefined state initialization. I really believed that a seed was needed after that.
I don't know yet if gmp_randinit_default() is architecture- or platform-dependent, \
but I will investigate.
Pierre
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic