src/java.base/share/classes/java/util/random/L64X256MixRandom.java
branchJDK-8193209-branch
changeset 57684 7cb325557832
parent 57547 56cbdc3ea079
child 59080 1b314be4feb2
--- a/src/java.base/share/classes/java/util/random/L64X256MixRandom.java	Wed Aug 07 15:35:55 2019 -0300
+++ b/src/java.base/share/classes/java/util/random/L64X256MixRandom.java	Thu Aug 08 11:06:54 2019 -0300
@@ -61,7 +61,7 @@
  * The LCG subgenerator for {@link L64X256MixRandom} has an update step of the
  * form {@code s = m * s + a}, where {@code s}, {@code m}, and {@code a} are all
  * of type {@code long}; {@code s} is the mutable state, the multiplier {@code m}
- * is fixed (the same for all instances of {@link L64X256MixRandom}}) and the addend
+ * is fixed (the same for all instances of {@link L64X256MixRandom}) and the addend
  * {@code a} is a parameter (a final field of the instance).  The parameter
  * {@code a} is required to be odd (this allows the LCG to have the maximal
  * period, namely 2<sup>64</sup>); therefore there are 2<sup>63</sup> distinct choices
@@ -327,7 +327,15 @@
         final long z = s + x0;
         s = M * s + a;  // LCG
         long q0 = x0, q1 = x1, q2 = x2, q3 = x3;
-        { long t = q1 << 17; q2 ^= q0; q3 ^= q1; q1 ^= q2; q0 ^= q3; q2 ^= t; q3 = Long.rotateLeft(q3, 45); }  // xoshiro256 1.0
+        {   // xoshiro256 1.0
+            long t = q1 << 17;
+            q2 ^= q0;
+            q3 ^= q1;
+            q1 ^= q2;
+            q0 ^= q3;
+            q2 ^= t;
+            q3 = Long.rotateLeft(q3, 45);
+        }
         x0 = q0; x1 = q1; x2 = q2; x3 = q3;
         return RandomSupport.mixLea64(z);  // mixing function
     }