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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 8 12:49:11 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10550



--- Comment #12 from Joseph Rushton Wakeling <joseph.wakeling at webdrake.net> 2013-07-08 12:49:09 PDT ---
(In reply to comment #11)
> (In reply to comment #10)
> > I rechecked the paper and I agree with you (y^=, a < c and 160's >>)
> > So I think we can fix this paper derived bugs.
> > Could you send the pull request?
> > After passed auto tester, I will merge it.
> 
> Yes, I'll get that submitted either later this evening or tomorrow. :-)

First step -- corrected reference code:
https://github.com/WebDrake/xorshift

I first implemented versions that match _exactly_ Marsaglia's sample code, and
that reproduce the checking values from std.random:
https://github.com/WebDrake/xorshift/blob/4305bd5a0ac4d94f59505713a085b34d2e4d482e/xorshift.c

Subsequent commits correct the typos we've observed, and so the current version
can be used to generate updated checking values.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list