Middle-square method: Difference between revisions

Content deleted Content added
Gazpacho (talk | contribs)
No edit summary
m better link
Line 1:
In [[mathematics]], the [[middle-square method]] is a method of generating [[pseudorandom number generator|pseudorandom]] numberss. 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.
 
For example, to generate a sequence of ten-digit pseudorandom numbers, you would create a ten-digit starting value and square it. The middle ten digits of the result would be the next number in the sequence. You would then square that, and so on.