PreviousUpNext

13.2.43  random

The standard library random package implements a decent subtract-with-borrow (SWB) pseudo-random number generator as described in Marsaglia and Zaman, "A New Class of Random Number Generators, Ann. Applied Prob. 1 (3), 1991, p 462-480.

The SWB generator is a 31-bit generator with lags 48 and 8. It has period (21487 − 2247)/105 or about 10445. In general, these generators are excellent. However, they act locally like a lagged Fibonacci generator and thus have troubles with the birthday test. Thus, we combine this SWB generator with the linear congruential generator (48271*a)mod (231−1).

The random package implements the Random API.

The random package source code is in src/lib/src/random.pkg.

See also: rand.

The above information is manually maintained and may contain errors.

Random

Comments and suggestions to: bugs@mythryl.org

PreviousUpNext