From owner-freebsd-current Sun Feb 2 16:17:43 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E485137B401 for ; Sun, 2 Feb 2003 16:17:41 -0800 (PST) Received: from devonshire.cnchost.com (devonshire.concentric.net [207.155.248.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74E4D43E4A for ; Sun, 2 Feb 2003 16:17:41 -0800 (PST) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (adsl-209-204-185-216.sonic.net [209.204.185.216]) by devonshire.cnchost.com id TAA02092; Sun, 2 Feb 2003 19:17:32 -0500 (EST) [ConcentricHost SMTP Relay 1.15] Message-ID: <200302030017.TAA02092@devonshire.cnchost.com> Cc: Steve Kargl , Mark Murray , current@FreeBSD.ORG, "Andrey A. Chernov" Subject: Re: rand() is broken In-reply-to: Your message of "Sun, 02 Feb 2003 15:14:53 PST." <200302022314.SAA14785@illustrious.cnchost.com> Date: Sun, 02 Feb 2003 16:17:32 -0800 From: Bakul Shah Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > 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