Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
RANDU
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Pseudorandom number generator}} {{Use dmy dates|date=October 2020}} [[Image:Randu.png|thumb|right|[[Three-dimensional space|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 [[2D geometric model|two-dimensional]] [[Plane (mathematics)|planes]].]] '''RANDU'''<ref name=":0">Compaq Fortran Language Reference Manual (Order Number: AA-Q66SD-TK) September 1999 (formerly DIGITAL Fortran and DEC Fortran 90).</ref> is a [[linear congruential generator|linear congruential]] [[pseudorandom number generator]] (LCG) of the [[Park–Miller random number generator|Park–Miller type]], which was used primarily in the 1960s and 1970s.<ref name="Entacher-2000"> {{cite web | last = Entacher | first = Karl | title = A collection of classical pseudorandom number generators with linear structures – advanced version | date = June 2000 | url=http://random.mat.sbg.ac.at/results/karl/server/server.html | url-status=dead | archive-url=https://web.archive.org/web/20181118052935if_/http://random.mat.sbg.ac.at/results/karl/server/server.html | archive-date=2018-11-18 }}</ref> It is defined by the [[Recursion|recurrence]] : <math>V_{j+1} = 65539 \cdot V_j \bmod 2^{31}</math> with the initial seed number <math>V_0</math> as an [[even and odd numbers|odd number]]. It generates pseudorandom [[integer number|integers]] <math>V_j</math> which are [[uniform distribution (discrete)|uniformly distributed]] in the interval {{nowrap|[1, 2<sup>31</sup> − 1]}}, but in practical applications are often mapped into pseudorandom [[rational number|rationals]] <math>X_j</math> in the interval {{nowrap|(0, 1)}}, by the formula : <math>X_j = \frac{V_j}{2^{31}}.</math> IBM's RANDU is widely considered to be one of the most ill-conceived random number generators ever designed,<ref>[[Donald Knuth|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.]</ref> and was described as "truly horrible" by [[Donald Knuth]].<ref>Knuth (1998), p. 188.{{full citation needed|date=February 2024}}</ref> 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 2<sup>31</sup> and <math>65539 = 2^{16} + 3</math> calculations could be done quickly, using [[bitwise operator]]s in hardware, but the values were chosen for computational convenience, not statistical quality.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)