Mark Dickinson <dicki...@gmail.com> added the comment:

Responding to a comment from Serhiy on Rietveld:

> Modules/_randommodule.c:442: mt[0] = 0x80000000UL;
> mt[0] |= 0x80000000UL (according to the comment)?

The = 0x80000000UL was intentional.  The low-order 31 bits of mt[0] don't form 
part of the state of the Mersenne Twister:  the resulting random stream isn't 
affected by their values.  So all we have to do is make sure that bit 31 is 
set.  It's the same code that's used in init_by_array earlier in 
_randommodule.c.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14591>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to