Commit Graph

2 Commits

Author SHA1 Message Date
c79cd27e9e prng: fix rand() to give good sequence with small state
some applications rely on the low bits of rand() to be reasonably good
quality prng, so now it fixed by using the top bits of a 64 bit LCG,
this is simple, has small state and passes statistical tests.
D.E. Knuth attributes the multiplier to C.E. Haynes in TAOCP Vol2 3.3.4
2013-06-08 13:31:10 +00:00
0b44a0315b initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00