[Issue 20746] Change LCG in garbage collector treap to use full 64 bits of state instead of 48

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 19 07:15:44 UTC 2020


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

Dominikus Dittes Scherkl <dominikus at scherkl.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dominikus at scherkl.de

--- Comment #2 from Dominikus Dittes Scherkl <dominikus at scherkl.de> ---
Sorry, but there was no bug and this is NOT an improvement.
The generator output is 32 bit and the internal state of course will use the
whole 64 bit (even if not from the start), but it put out bits from the middle
of the state.
Output the lowest 32 bits will make it less "random" - if fact very
predictable.

Please, this is not a good pseudo-random number generateor, but at least it
worked. now its destroyed.
Revert this change!

--


More information about the Digitalmars-d-bugs mailing list