rand method
Implementation
double rand() {
int t = javaLongToInt(randseed[0] ^ (randseed[0] << 11));
randseed[0] = randseed[1];
randseed[1] = randseed[2];
randseed[2] = randseed[3];
randseed[3] = randseed[3] ^ (randseed[3] >> 19) ^ t ^ (t >> 8);
double t1 = randseed[3].abs().toDouble();
return t1 / javaMaxInteger;
}