module Concurrent::ThreadSafe::Util::XorShiftRandom

def xorshift(x)

using the "yˆ=y>>a; yˆ=y<>c;" transform with the (a,b,c) tuple with values (3,1,14) to minimise Bignum overflows
def xorshift(x)
  x ^= x >> 3
  x ^= (x << 1) & MAX_INT # cut-off Bignum overflow
  x ^= x >> 14
end