Message162128
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. |
|
Date |
User |
Action |
Args |
2012-06-02 08:32:53 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, pitrou, vstinner, serhiy.storchaka, Dave.Reid |
2012-06-02 08:32:53 | mark.dickinson | set | messageid: <1338625973.28.0.3126152926.issue14591@psf.upfronthosting.co.za> |
2012-06-02 08:32:52 | mark.dickinson | link | issue14591 messages |
2012-06-02 08:32:52 | mark.dickinson | create | |
|