Date: Sun, 16 Feb 2003 19:52:35 -0800 (PST) From: "Andrey A. Chernov" <ache@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/stdlib rand.c Message-ID: <200302170352.h1H3qawJ062671@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
ache 2003/02/16 19:52:35 PST
Modified files:
lib/libc/stdlib rand.c
Log:
Back out "drop first N values" method of removing monotonically increased
seed->first value correlation. It breaks rand_r()... Other possible methods
like shuffling inside aray will breaks rand_r() too, because it assumes
only one word state, i.e. nothing extra can be added after seed assignment
in srand().
BTW, for old formulae seed->first value correlation is not so monotonically
increased as with other Linear Congruential Generators of this type only
becase arithmetic overflow happens. But overflow affects distribution
and lower bits very badly, as many articles says, such type of overflow
not improves PRNG.
So, monotonically increased seed->first value correlation problem remains...
Revision Changes Path
1.15 +1 -7 src/lib/libc/stdlib/rand.c
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-src" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302170352.h1H3qawJ062671>
