[squeak-dev] The Squeak Random Number Generator

Jim Rosenberg jr at amanue.com
Sun Sep 7 02:45:41 UTC 2008


I'm getting very queasy feelings about Random.

My understanding of the linear congruence random number generator algorithm 
is that it depends (crucially) on doing exact integer arithmetic with 
enough precision to hold all the digits in the multiplication at its heart. 
Using floating point arithmetic for a linear congruence algorithm is one of 
the classic ways of implementing a random number generator that is badly 
flawed.

In my version of Squeak (3.8) the class Random seems to be using floats. Uh 
oh.

Can somebody comment? Has the Squeak random number generator ever been 
tested? (Knuth gives a whole raft of tests ...)



More information about the Squeak-dev mailing list