ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/SplittableRandom.java
(Generate patch)

Comparing jsr166/src/main/java/util/SplittableRandom.java (file contents):
Revision 1.13 by dl, Thu Jul 25 13:19:09 2013 UTC vs.
Revision 1.14 by dl, Mon Aug 5 13:58:02 2013 UTC

# Line 129 | Line 129 | public class SplittableRandom {
129       * calls to nextSeed(): Each instance carries the state of this
130       * generator as nextSplit. Gammas are treated as 57bit values,
131       * advancing by adding GAMMA_GAMMA mod GAMMA_PRIME, and bit-mixed
132 <     * with a 57-bit version of mix, using the "Mix01" multiplicative
132 >     * with a 57-bit version of mix, using the "Mix13" multiplicative
133       * constants for MurmurHash3 described by David Stafford
134       * (http://zimbry.blogspot.com/2011/09/better-bit-mixing-improving-on.html).
135       * The value of GAMMA_GAMMA is arbitrary (except must be at least
# Line 262 | Line 262 | public class SplittableRandom {
262       * above for explanation.
263       */
264      private static long mix57(long z) {
265 <        z ^= (z >>> 33);
266 <        z *= 0x7fb5d329728ea185L;
265 >        z = (z ^ (z >>> 30)) * 0xbf58476d1ce4e5b9L;
266          z &= 0x01FFFFFFFFFFFFFFL;
267 <        z ^= (z >>> 33);
269 <        z *= 0x81dadef4bc2dd44dL;
267 >        z = (z ^ (z >>> 27)) * 0x94d049bb133111ebL;
268          z &= 0x01FFFFFFFFFFFFFFL;
269 <        z ^= (z >>> 33);
269 >        z ^= (z >>> 31);
270          return z;
271      }
272  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines