Middle-square method: Difference between revisions

Content deleted Content added
Erik9bot (talk | contribs)
SmackBot (talk | contribs)
m remove Erik9bot category,outdated, tag and general fixes
Line 1:
{{Unreferenced stub|auto=yes|date=December 2009}}
[[Image:Middle-square method.svg|right|250px|thumb|One iteration of the middle-square method, showing a six digit seed, which is then squared, and the resulting value has its middle six digits as the output value (and also as the next seed for the sequence).]]
 
In [[mathematics]], the [['''middle-square method]]''' is a method of generating [[pseudorandom number]]s. In practice it is not a good method, since its period is usually very short and it has some crippling weaknesses. The method was first suggested by [[John Von Neumann]] in 1946.
 
To generate a sequence of ten-digit pseudorandom numbers, a ten-digit starting value is created and squared. The middle ten digits of the result would be the next number in the sequence, and returned as the result. This process is then repeated to generate more numbers.
Line 15 ⟶ 16:
* [[Blum Blum Shub]]
 
{{DEFAULTSORT:Middle-Square Method}}
[[Category:Pseudorandom number generators]]
 
[[Category:Articles lacking sources (Erik9bot)]]
 
{{compuCompu-sci-stub}}
 
[[de:Mittquadratmethode]]