Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site allegra.UUCP Path: utzoo!watmath!clyde!akgua!mcnc!decvax!harpo!ulysses!allegra!don From: don@allegra.UUCP (D. Mitchell) Newsgroups: net.unix-wizards Subject: randomness Message-ID: <2431@allegra.UUCP> Date: Sun, 22-Apr-84 01:20:24 EST Article-I.D.: allegra.2431 Posted: Sun Apr 22 01:20:24 1984 Date-Received: Mon, 23-Apr-84 01:25:10 EST Organization: AT&T Bell Laboratories, Murray Hill Lines: 14 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.