A not so Random Random
Juan Cires Martinez
jcm at mat.upm.es
Tue May 25 15:49:47 UTC 1999
Hello:
I am using a lot of Randoms lately, and something strange has happened a
couple of times today: I get Randoms which after a while produce an
unending sequence of 1.0s. The instance variables of these Randoms are:
seed: 2.147483647e9
a: 16807.0
m: 2.147483647e9
q: 127773.0
r: 2836.0
It is quite annoying. I do not know the details of the random number
generation algorithm. Is there a way to avoid it besides explicit
testing for 1.0 in Random>>next?
Thanks, Juan.
More information about the Squeak-dev
mailing list
|