equal
deleted
inserted
replaced
313 */ |
313 */ |
314 public long nextLong() { |
314 public long nextLong() { |
315 final long z = s + x0; |
315 final long z = s + x0; |
316 s = M * s + a; // LCG |
316 s = M * s + a; // LCG |
317 long q0 = x0, q1 = x1; |
317 long q0 = x0, q1 = x1; |
318 { q1 ^= q0; q0 = Long.rotateLeft(q0, 24); q0 = q0 ^ q1 ^ (q1 << 16); q1 = Long.rotateLeft(q1, 37); } // xoroshiro128v1_0 |
318 { // xoroshiro128v1_0 |
|
319 q1 ^= q0; |
|
320 q0 = Long.rotateLeft(q0, 24); |
|
321 q0 = q0 ^ q1 ^ (q1 << 16); |
|
322 q1 = Long.rotateLeft(q1, 37); |
|
323 } |
319 x0 = q0; x1 = q1; |
324 x0 = q0; x1 = q1; |
320 return Long.rotateLeft(z * 5, 7) * 9; // "starstar" mixing function |
325 return Long.rotateLeft(z * 5, 7) * 9; // "starstar" mixing function |
321 } |
326 } |
322 |
327 |
323 public BigInteger period() { |
328 public BigInteger period() { |