[Issue 10550] Xorshift32 and Xorshift160 do not generate uniformly-distributed random numbers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 27 22:46:45 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=10550

Zach Bjornson <zbbjornson at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zbbjornson at gmail.com

--- Comment #17 from Zach Bjornson <zbbjornson at gmail.com> ---
I know this is an old bug, but for the sake of tying up loose ends:

The 13,17,5 triple is valid: On the bottom of page 2 [1], Marsaglia says "Of
those 81 triples with a < c, the triple (c, b, a) also provides a full period
T...". The triple 5,17,13 appears in the 32-bit table, so 13,17,5 is valid.

The triple used in the commit in this issue (13,17,15) is also valid, but was
an unnecessary change. The fix to add the xor was necessary.

[1] http://www.jstatsoft.org/v08/i14/paper

--


More information about the Digitalmars-d-bugs mailing list