next up previous contents
Next: Changes in the Up: Changes in the Previous: Changes in the

New Random Number Generators

  Three new generators in addition to the original lagged Fibonacci generator are now available. The generators are identified by an integer:

0
The original XLISP-STAT generator, Marsaglia's portable generator from CMLIB. This is a lagged Fibonacci generator.
1
L'Ecuyer's [5] version of the Wichmann-Hill [9] generator, also used in Bratley, Fox and Schrage, [1, program UNIFL,].
2
Marsaglia's Super-Duper, as used in S.
3
Combined Tausworthe generator of Tezuka and L'Ecuyer [8].

The default generator is generator 1. Generator 0 has a period of . All three new generators have periods on the order of .

Random states are now printed as

> *random-state*
#$(1 #(2147483562 0 11716 54063))
The function make-random-state  produces a new seed from the current generator when called with the argument t. An alternate generator can be specified by supplying an appropriate integer as a second argument:
> (make-random-state t)
#$(1 #(2147483562 0 11716 54088))
> (make-random-state t 2)
#$(2 #(2147483647 0 0 11715 0 54105))

When make-random-state  is called with an old state vector, a new state for generator 0 is returned.



Luke Tierney
Wed Feb 26 05:25:18 CST 1997