You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @tridao, thanks for bringing this to our attention. And you're absolutely correct, this is a bug. I think it's a bit interesting that this RNG still managed to pass practrand and testU01 battery of statistical tests.
One thing to note, and perhaps I should make it more explicit in the doc, please don't use 64bit seed with this particular implementation of Squares. Squares algorithm requires the key (i.e. seed here) to have certain properties (e.g. "The key should be an irregular bit pattern with roughly half ones and
half zeros"), whereas we wanted to allow developers to use any unique integer as seed, and the hashing we use to solve this forced us to trim down seed.
Hi,
I was just reading the Squares RNG implementation here and it seems to differ from the paper.
In round 4, the paper has
However, in the code here,
OpenRAND/include/openrand/squares.h
Line 138 in ba9fec3
you have
So the difference is that the paper uses
t
to xor while the code uses(t >> 32) | (t << 32)
to xor.The text was updated successfully, but these errors were encountered: