Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Feb 2003 14:47:59 +0300
From:      "Andrey A. Chernov" <ache@nagual.pp.ru>
To:        Tim Robbins <tjr@FreeBSD.ORG>
Cc:        Kris Kennaway <kris@obsecurity.org>, current@FreeBSD.ORG
Subject:   Re: cvs commit: src/lib/libc/stdlib rand.c
Message-ID:  <20030217114759.GA31054@nagual.pp.ru>
In-Reply-To: <20030217173955.A29826@dilbert.robbins.dropbear.id.au>
References:  <200302170352.h1H3qawJ062671@repoman.freebsd.org> <20030217045729.GA68471@rot13.obsecurity.org> <20030217164048.A28273@dilbert.robbins.dropbear.id.au> <20030217055309.GA28024@nagual.pp.ru> <20030217173955.A29826@dilbert.robbins.dropbear.id.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 17, 2003 at 17:39:55 +1100, Tim Robbins wrote:

> > variant (which generates bad quality ones), the only problem remains is
> > first value monotonically increased with the seed.
> 
> Here's an interesting picture of that: http://people.freebsd.org/~tjr/rand.gif
> 

Nothing surprising here. It is common and know problem for all mod-type 
PRNGs. There is even good methods exists to eliminate this thing, see

http://www.physik.uni-giessen.de:8081/PhysOfFinance/PoF09.pdf

"Shuffling Algorithm" section for example. But all such methods will be 
incompatible with rand_r()...

-- 
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?20030217114759.GA31054>