[issue14591] Value returned by random.random() out of valid range

Mark Dickinson report at bugs.python.org
Thu Apr 19 08:54:31 CEST 2012


Mark Dickinson <dickinsm at gmail.com> added the comment:

Here's a modification of Serhiy's patch that assures that the new state is nonzero.

(Just to clarify the nonzero requirement:  the MT state is formed from bit 31 of mt[0] together with all the bits of mt[i], 1 <= i < 624.  At least one of these 19937 bits must be nonzero.)

----------
Added file: http://bugs.python.org/file25267/random_jumpahead_2.patch

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


More information about the Python-bugs-list mailing list