Using this C code for reference (sourced from http://en.wikipedia.org/wiki/Xorshift):
uint64_t s[2];
uint64_t xorshift128plus(void) {
uint64_t x = s[0];
uint64_t const y = s[1];
s[0] = y;
x ^= x << 23; // a
x ^= x >> 17; // b
x ^= y ^ (y >> 26); // c
s[1] = x;
return x + y;
}
Is the following the equivalent java code in terms of maintaining the randomness properties (other than a different mapping between seeds and return value):
long s[2];
long xorshift128plus(){
long x = s[0];
long y = s[1];
s[0] = y;
x ^= x << 23; // a
x ^= x >>> 17; // b
x ^= y ^ (y >>> 26); // c
s[1] = x;
return x + y;
}