RANDU

Three-dimensional plot of 100,000 values generated with RANDU. Each point represents 3 consecutive pseudorandom values. It is clearly seen that the points fall in 15 two-dimensional planes.

RANDU[1] is a linear congruential pseudorandom number generator (LCG) of the Park–Miller type, which was used primarily in the 1960s and 1970s.[2] It is defined by the recurrence

with the initial seed number as an odd number. It generates pseudorandom integers which are uniformly distributed in the interval [1, 231 − 1], but in practical applications are often mapped into pseudorandom rationals in the interval (0, 1), by the formula

IBM's RANDU is widely considered to be one of the most ill-conceived random number generators ever designed,[3] and was described as "truly horrible" by Donald Knuth.[4] It fails the spectral test badly for dimensions greater than 2, as shown below.

The reason for choosing these particular values for the multiplier and modulus had been that with a 32-bit-integer word size, the arithmetic of mod 231 and calculations could be done quickly, using bitwise operators in hardware, but the values were chosen for computational convenience, not statistical quality.

  1. ^ Compaq Fortran Language Reference Manual (Order Number: AA-Q66SD-TK) September 1999 (formerly DIGITAL Fortran and DEC Fortran 90).
  2. ^ Entacher, Karl (June 2000). "A collection of classical pseudorandom number generators with linear structures – advanced version". Archived from the original on 18 November 2018.
  3. ^ Knuth D. E. The Art of Computer Programming, Volume 2: Seminumerical Algorithms, 2nd edition. Addison-Wesley, 1981. ISBN 0-201-03822-6. Section 3.3.4, p. 104: "its very name RANDU is enough to bring dismay into the eyes and stomachs of many computer scientists!" [Extensive coverage of statistical tests for non-randomness.]
  4. ^ Knuth (1998), p. 188.[full citation needed]