pitdicker / small-rngs

A collection of small PRNGs
2 stars 3 forks source link

MSWS seems incorrect #3

Open TheIronBorn opened 6 years ago

TheIronBorn commented 6 years ago

This lib outputs the full 64-bits while the reference implementation only outputs 32-bits. (It also adds the Weyl sequence after squaring instead of before squaring)


inline static uint32_t msws() {

   x *= x; x += (w += s); return x = (x>>32) | (x<<32);

}
TheIronBorn commented 6 years ago

It also sets x to the rotated x rather than merely outputting it