Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Feb 2003 16:02:38 +0300
From:      "Andrey A. Chernov" <ache@nagual.pp.ru>
To:        Kris Kennaway <kris@obsecurity.org>, current@FreeBSD.ORG
Subject:   Re: rand() is broken
Message-ID:  <20030204130238.GA92301@nagual.pp.ru>
In-Reply-To: <20030204120730.GA91888@nagual.pp.ru>
References:  <20030202070644.GA9987@rot13.obsecurity.org> <20030202090422.GA59750@nagual.pp.ru> <20030203002639.GB44914@HAL9000.homeunix.com> <20030203100002.GA73386@nagual.pp.ru> <20030204054020.GA2447@HAL9000.homeunix.com> <20030204094659.GA87303@nagual.pp.ru> <20030204115237.GA6483@HAL9000.homeunix.com> <20030204120730.GA91888@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 04, 2003 at 15:07:30 +0300, Andrey A. Chernov wrote:
> On Tue, Feb 04, 2003 at 03:52:37 -0800, David Schultz wrote:
> > 
> > You can do better than the present generator with 32 bits of state.
> > See the following page by Neal Wagner (not to be confused with David Wagner):
> > 	http://www.cs.utsa.edu/~wagner/laws/rng.html
> > The section on LCGs suggests that the multiplier FreeBSD uses (7^5)
> > is not particularly good, and points out some better values suggested
> > by Knuth.  I can't find the original discussion in TAOCP vol. 2, but

Two variants looks interesting from that paper:

m=2^31-1, k=48271
m=2^31-1, k=62089911

Do you know any comparison of them with what we currently have, i.e.

m=2^31-1, k=16807

-- 
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?20030204130238.GA92301>