next up previous
Next: Recent Developments Up: Additions Since First Release Previous: Packages

Random Number Generators

The random number generator mechanism has been changed to replace the original generator by more adequate ones and to support multiple generators. The mechanism represents a compromise between flexibility and performance. Generators are specified by an integer index. New generators can be added by adding to an internal C table. The currently available generators are
0
The original lagged Fibonacci generator.
1
L'Ecuyer's [4] version of Wichmann-Hill generator.
2
Marsaglia's Super-Duper, as used in S.
3
Combined Tausworthe generator of Tezuka and L'Ecuyer [5].
The default generator is generator 1. All three new generators have periods on the order of 260.

Random states are now printed as

> *random-state*
#$(1 #(2147483562 0 11716 54063))
A new random state for the default generator is produced by
> (make-random-state t)
#$(1 #(2147483562 0 11716 54088))
An alternate generator is specified by giving the generator index as a second argument. Thus a state for the Super-Duper generator is produced by
> (make-random-state t 2)
#$(2 #(2147483647 0 0 11715 0 54105))



Luke Tierney
5/27/1998