[issue9816] random.jumpahead and PRNG sequence independence

Raymond Hettinger report at bugs.python.org
Fri Sep 10 12:48:53 CEST 2010


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

I see the problem now.  Random.jumpahead(n) does a very poor job of shuffling MT's state when n is small.  The first few numbers of the state are different but some of the later ones are not.  When random() crawls across parts of the state that are identical, it produces identical output.  Later when has wrapped around, the random() calls diverge again.

Fixed by salting the jumpahead value.  See r84665.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9816>
_______________________________________


More information about the Python-bugs-list mailing list