by eutectic · 2y ago · 0 comments
uint64_t x = 0, w = 1;
uint64_t msws64(void) {
x = x * x + (w *= 0xe9acc0f334e93bd5ULL);
return (x = (x >> 32) | (x << 32)) ^ w;
}Alternatively, you can just call the 32 bit one twice and build a 64 bit value from the results.
Edit: I didn't see that you changed the algorithm more than removing the truncation. It is honestly suprizingly good for exposing that much state, but it fails PractRand after 16 GB.
It is honestly suprizingly good and hasn't failed PractRand yet (I'm at >64 GB).