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. It fails the spectral test badly for dimensions greater than 2, and every integer result is odd. However, at least eight low-order bits are dropped when converted to single-precision (32 bit, 24 bit mantissa) floating-point.
The reason for choosing these particular values is that with a 32-bit-integer word size, the arithmetic of mod 231 and calculations could be done quickly, using special features of some computer hardware.
Problems with multiplier and modulus
To show the problem with these values, of multiplier 65539 and modulus 231, consider the following calculation where every term should be taken mod 231. Start by writing the recursive relation as:
which becomes, after expanding the quadratic factor:
- because 232 mod 231 = 0
and allows us to show the correlation between three points as:
As a result of this correlation, the points in three-dimensional space (mod 231) fall in 15 planes.[not in citation given] As a result of the wide use of RANDU in the early 1970s, many results from that time are seen as suspicious.
The start and end of the RANDU’s output period for the initial seed is:
- Entacher, Karl (June 2000). "A collection of classical pseudorandom number generators with linear structures - advanced version". Retrieved 8 August 2013.
- Knuth D.E. The Art of Computer Programming, Volume 2: Seminumerical Algorithms, Second Edition. Addison-Wesley, 1981. ISBN 0-201-03822-6. Section 3.3.4, p. 104. [Extensive coverage of statistical tests for non-randomness.]
- Marsaglia, George (1968). "Random Numbers Fall Mainly in the Planes". Proc. Natl. Acad. Sci. U.S.A. 61 (1): 25–28. doi:10.1073/pnas.61.1.25.
- Press, William H.; et al. (1992). Numerical Recipes in Fortran 77: The Art of Scientific Computing (2nd ed.). ISBN 0-521-43064-X.
- ref. 7 of http://portal.acm.org/citation.cfm?id=363827
|Wikiquote has quotations related to: RANDU|