Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

From Wikipedia, the free encyclopedia

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 twodimensional planes.

RANDU is a linear congruential pseudorandom number generator of the ParkMiller type,


which has been used since the 1960s.[1] It is defined by the recurrence:

with the initial seed number,


pseudorandom integers

as an odd number. It generates

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:


.
It is widely considered to be one of the most ill-conceived random number
generators ever designed.[citation needed] It fails the spectral testbadly 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 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.


We'll get right to it: Today we ask you to help Wikipedia. We survive on
donations averaging about 50 lei. If we all gave 10 lei, the fundraiser would be
over in an hour.

DONATE NOW

Problems with multiplier and modulus[edit]

To show the problem with these values, of multiplier 65539 and modulus 2 31,
consider the following calculation where every term should be taken mod 2 31. 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.[2] As a result of the wide use of RANDU in
the early 1970s, many results from that time are seen as suspicious.
[3]

You might also like