Even as a non-cryptographic PRNG, MT19937 is still pretty bad: it fails several of the statistical tests in the TestU01 'BigCrush' battery. By comparison, Melissa O'Neill's PCG is a great non-cryptographic PRNG (very fast, very compact, and passes TestU01 even when you restrict the state space): https://www.pcg-random.org/index.html Daniel Lemire has written a review of this generator: https://lemire.me/blog/2017/08/15/on-melissa-oneills-pcg-random-number-gener... Another good generator is George Marsaglia's Xorshift* 64/32 -- that is to say, the upper 32 bits of the 64-bit output -- as described here: https://en.wikipedia.org/wiki/Xorshift#xorshift* As a side-note, Sebastian Vigna seems to have a chip (or maybe a full silicon wafer) on his shoulder regarding O'Neill and her PRNGs. See, for example, this: https://www.pcg-random.org/posts/on-vignas-pcg-critique.html Best wishes, Adam P. Goucher
Sent: Sunday, January 31, 2021 at 2:10 AM From: "Simon Plouffe" <simon.plouffe@gmail.com> To: math-fun@mailman.xmission.com Subject: Re: [math-fun] Reciprocals of integers in binary
Yes, I am aware that MT19937 is not perfect and also that it is not good enough for cryptography. But : almost all math packages are using it.
For most Monte-Carlo programs : it is quite sufficiently random. It passes many tests including hard ones and Knuth criteria. You need a pretty high level of randomness to find the limits of this monster.
I think that this kind of <discussion> has already occurred many times for random number generators.
There is a saying in this area (Von Neumann) :
Anyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin.
Best regards, Simon Plouffe
Le 2021-01-31 à 02:49, Fred Lunnon a écrit :
<< The Mersenne Twister is a procedure to produce very good random numbers. >>
However, for a more nuanced view see https://arxiv.org/pdf/1910.06437.pdf
WFL
On 1/31/21, Simon Plouffe <simon.plouffe@gmail.com> wrote:
Hello, this is also true in base 10. But with conditions. The period needs to be even. For primes it is always true (if the period is even).
1/7 = 0.142857 and 142 + 857 = 999.
Numbers have to be to a multiple of 2 or 5 within the factorization.
1/323 in base 10 has 144 digits from which the first 72 are complement to the other half, 323 = 17*19.
Important remark : If you take any integer m and if you can tell which half you are or another way of saying it : if you can tell where the half period is : this is enough information to factor m. Of course, a number m of let's say 300 digits could have a very long period when we compute 1/m.
This fact was taken into account when they constructed the Mersenne Twister by using the period of 2^19937 -1. It has 10^6002 digits. The Mersenne Twister is a procedure to produce very good random numbers. So good that these days, most of the serious math programs uses it . (even excel and microsoft).
Best regards, Simon Plouffe
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun