Date: Sun, 2 Feb 2003 23:48:03 +0300 From: "Andrey A. Chernov" <ache@nagual.pp.ru> To: Bakul Shah <bakul@bitblocks.com> Cc: Edward Brocklesby <ejb@lythe.org.uk>, current@FreeBSD.ORG Subject: Re: rand() is broken Message-ID: <20030202204803.GA67572@nagual.pp.ru> In-Reply-To: <200302022039.PAA13951@warspite.cnchost.com> References: <200302022018.h12KIC1a008066@a.smtp.serv.lythe.org.uk> <200302022039.PAA13951@warspite.cnchost.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 02, 2003 at 12:39:50 -0800, Bakul Shah wrote: > > Note that it is rand() that is broken, not random() as can be > seen by modifying Kris Kennaways' test so I don't see why > Mark Murray was talking about changing it in the first place. About correlation bug: it is srand() which is broken, not rand(). It is common practice for this type of PRNGs to throw out N values after seeding to remove correlation and srand() not follow this. My first patch fix this. -- Andrey A. Chernov http://ache.pp.ru/ 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?20030202204803.GA67572>