[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: new PRNG's
- From: Albert Chan <albertmcchan@...>
- Date: Tue, 8 May 2018 08:22:58 -0400
> On May 8, 2018, at 5:06 AM, Sergey Rozhenko <firstname.lastname@example.org> wrote:
> What about LuaJIT's PRNG? Having the same PRNG would be good for compatibility.
Compatibility with LuaJIT ?
Should it be the other way around ?
> "LuaJIT uses a Tausworthe PRNG with period 2^223 to implement math.random() and math.randomseed()."
Tausworthe PRNG is old (1991), and will fail linearity test.
(It look like xorshift+ without the plus "scrambler")
LuaJIT's implementation also have problem with range bias.
(It just use 52 bit random float to calculate math.random(n,m))