src/java.base/share/classes/java/util/random/L64X128MixRandom.java
branchJDK-8193209-branch
changeset 57684 7cb325557832
parent 57547 56cbdc3ea079
child 59080 1b314be4feb2
equal deleted inserted replaced
57671:6a4be8bf8990 57684:7cb325557832
   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() {