RANDU is an infamous linear congruentialpseudorandom number generator which has been used since the 1960s. It is defined by the recurrence: Linear congruential generators (LCGs) represent one of the oldest and best-known pseudorandom number generator algorithms. ... A pseudorandom number generator (PRNG) is an algorithm that generates a sequence of numbers, the elements of which are approximately independent of each other. ... The 1960s in its most obvious sense refers to the decade between 1960 and 1969, but the expression has taken on a wider meaning over the past twenty years. ...
with V0odd. In mathematics, any integer is either even or odd. ...
It is widely considered to be one of the most ill-conceived random number generators designed. Notably, it does not have a full period, due to the poor choices of modulus and multiplier; it also fails the spectral test badly for dimensions greater than 2.
...its very name RANDU is enough to bring dismay into the eyes and stomachs of many computer scientists! —Donald Knuth
Donald Knuth at a reception for the Open Content Alliance. ...
References
Donald E. Knuth, The Art of Computer Programming, Volume 2: Seminumerical Algorithms, 3rd edition (Addison-Wesley, Boston, 1998).
The RANDU routine is considered obsolete and is now completely undocumented, but it still exists in the VMS FORTRAN Run-Time Library and will always exist to support any old programs which still use it.
The algorithmRANDU uses to generate successive random numbers is: SEED = (65539*SEED) MOD 2**31 X = SEED/2**31 This is a linear congruential generator with: A = 65539 C = 0 M = 2**31 Note first that the modulus M for RANDU is 2**31 whereas the modulus M for MTH$RANDOM is 2**32.
The obsolete RANDU generator does require an odd seed value, but for the MTH$RANDOM generator the seed value alternates between even and odd values at each iteration, so there is no advantage to starting with an odd value.
It is widely considered to be one of the most ill-conceived random number generators designed.
Notably, it does not have a full period, due to the poor choices of modulus and multiplier; it also fails the spectral test badly for dimensions greater than 2.