Middle-square method: Difference between revisions

Content deleted Content added
Gazpacho (talk | contribs)
stubsort
Line 7:
Von Neumann was aware of these problems, but for his purposes the middle-square method was quick (important for use on the [[ENIAC]]), and its errors were easy to detect (when it failed, it generally failed spectacularly).
 
{{comp-stub}}
 
==See also==
* [[Linear congruential generator]]
* [[Blum Blum Shub]]
 
[[Category:Pseudorandom number generators]]
The following is a simple C++ program that generates the random numbers given an initial remainder we refer to as Zo= Xn in our case above.
 
Line 44 ⟶ 38:
}
 
==See also==
* [[Linear congruential generator]]
* [[Blum Blum Shub]]
 
[[Category:Pseudorandom number generators]]
{{comp-stub}}