randomness

D. Mitchell don at allegra.UUCP
Sun Apr 22 16:20:24 AEST 1984


My statement was not misleading.  "random()" as distributed, is very
poor.  While Mr. Cohen says he ran extensive checks, I found it badly
failed simple correlation tests.  I use my own generator (which I
posted) so I just forgot about it.  A few days later, Jim Reeds ran
some tests and actually predicted the bug on the basis of those test,
which we then found.  (That is, the use of a polynomial that was not
irreducible)

I would say with the bug fixed, random() is just fine.

If you want floating point numbers, I would recommend my frandom().  It
generates a full 56-bit random mantissa, and is therefore much better
(and much faster) than dividing an integer random number by
(double)2**31.



More information about the Comp.unix.wizards mailing list