Next: , Up: Random Number Generation   [Contents][Index]


2.19.1 MT-19937 Generator

Note: This generator is deprecated in favor of the xoroshiro128+ generator (see xoroshiro128+ Generator) which is faster and uses less memory.

On all platforms, the random number is MT-19937 generator as indicated by :rand-mt19937 being in *features*. This is a Lisp implementation of the MT-19937 generator of Makoto Matsumoto and T. Nishimura. We refer the reader to their paper2 or to their website.

When CMUCL starts up, *random-state* is initialized by reading 627 words from /dev/urandom, when available. If /dev/urandom is not available, the universal time is used to initialize *random-state*. The initialization is done as given in Matsumoto’s paper.


Footnotes

(2)

“Mersenne Twister: A 623-Dimensionally Equidistributed Uniform Pseudorandom Number Generator,” ACM Trans. on Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp.3–30