From owner-freebsd-current Sun Feb 2 16: 0:40 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 A02A637B401 for ; Sun, 2 Feb 2003 16:00:39 -0800 (PST) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB3C643F93 for ; Sun, 2 Feb 2003 16:00:38 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0402.cvx21-bradley.dialup.earthlink.net ([209.179.193.147] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 18fU2N-0000ay-00; Sun, 02 Feb 2003 16:00:35 -0800 Message-ID: <3E3DB0D1.2B02CAF5@mindspring.com> Date: Sun, 02 Feb 2003 15:59:13 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Edward Brocklesby Cc: Bakul Shah , current@FreeBSD.ORG Subject: Re: rand() is broken References: <200302021848.NAA19508@agamemnon.cnchost.com> <200302021941.h12JfJ1a004169@a.smtp.serv.lythe.org.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a40154b70d2217bbcf993612496d3510d2350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c 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 Edward Brocklesby wrote: > On Sunday 02 February 2003 6:48 pm, Bakul Shah wrote: > > Guys, please realize that random() is also used in generating > > simulation inputs (or timing or whatever). If you go change > > the underlying algorithm or its parameters one can't generate > > the same sequence from the same seed when repeating a test. > > Maybe I missed something, but why cannot you just rip random() from libc, > rename it to bakul_shah_random() and use that in your testing code? Then you > are safe from any changes to random(), and indeed have a portable RNG if your > host OS changes. Binary packages from third party software vendors. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message