Date: Sun, 02 Feb 2003 16:17:32 -0800 From: Bakul Shah <bakul@bitblocks.com> Cc: Steve Kargl <sgk@troutmask.apl.washington.edu>, Mark Murray <mark@grondar.org>, current@FreeBSD.ORG, "Andrey A. Chernov" <ache@nagual.pp.ru> Subject: Re: rand() is broken Message-ID: <200302030017.TAA02092@devonshire.cnchost.com> In-Reply-To: Your message of "Sun, 02 Feb 2003 15:14:53 PST." <200302022314.SAA14785@illustrious.cnchost.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> Interesting.... The SunOS output exactly matches random(3) > behavior from 4.3BSD! In fact random() remained the same for > 4.3BSD-Reno, -Tahoe, 4.4BSD-Alpha and Net2. > > 4.2BSD random() behavior is different from all of the above. > There was real bug-fix between 4.2BSD and 4.3BSD. > > I don't know when the FreeBSD/Redhat change was made or if it > broke any statistical properties. FYI: The FreeBSD change was made in -r1.4 of random.c by Andrey in Oct 1996. The previous version of random.c behaves exactly the same as the one in 4.3BSD, SunOS and AIX. I am sorry I was too busy with other things then and missed this change. Andrey refers to an OCT 1988 CACM paper by Park & Miller "Random number generators: good ones are hard to find" as a justification for this change. Also FYI: NetBSD random(3) matches the 4.3BSD random(). Haven't checked OpenBSD. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302030017.TAA02092>