@@ -89,7 +89,8 @@ public static enum Shift {
8989 public long shift (long x , final Param param ) {
9090 x ^= x << param .a ;
9191 x ^= x >>> param .b ;
92- return x ^x << param .c ;
92+ x ^= x << param .c ;
93+ return x ;
9394 }
9495 },
9596
@@ -108,7 +109,8 @@ public long shift(long x, final Param param) {
108109 public long shift (long x , final Param param ) {
109110 x ^= x << param .c ;
110111 x ^= x >>> param .b ;
111- return x ^x << param .a ;
112+ x ^= x << param .a ;
113+ return x ;
112114 }
113115 },
114116
@@ -127,7 +129,8 @@ public long shift(long x, final Param param) {
127129 public long shift (long x , final Param param ) {
128130 x ^= x >>> param .a ;
129131 x ^= x << param .b ;
130- return x ^x >>> param .c ;
132+ x ^= x >>> param .c ;
133+ return x ;
131134 }
132135 },
133136
@@ -146,7 +149,8 @@ public long shift(long x, final Param param) {
146149 public long shift (long x , final Param param ) {
147150 x ^= x >>> param .c ;
148151 x ^= x << param .b ;
149- return x ^x >>> param .a ;
152+ x ^= x >>> param .a ;
153+ return x ;
150154 }
151155 },
152156
@@ -165,7 +169,8 @@ public long shift(long x, final Param param) {
165169 public long shift (long x , final Param param ) {
166170 x ^= x << param .a ;
167171 x ^= x << param .c ;
168- return x ^x >>> param .b ;
172+ x ^= x >>> param .b ;
173+ return x ;
169174 }
170175 },
171176
@@ -184,7 +189,8 @@ public long shift(long x, final Param param) {
184189 public long shift (long x , final Param param ) {
185190 x ^= x << param .c ;
186191 x ^= x << param .a ;
187- return x ^x >>> param .b ;
192+ x ^= x >>> param .b ;
193+ return x ;
188194 }
189195 },
190196
@@ -203,7 +209,8 @@ public long shift(long x, final Param param) {
203209 public long shift (long x , final Param param ) {
204210 x ^= x >>> param .a ;
205211 x ^= x >>> param .c ;
206- return x ^x << param .b ;
212+ x ^= x << param .b ;
213+ return x ;
207214 }
208215 },
209216
@@ -222,7 +229,8 @@ public long shift(long x, final Param param) {
222229 public long shift (long x , final Param param ) {
223230 x ^= x >>> param .c ;
224231 x ^= x >>> param .a ;
225- return x ^x << param .b ;
232+ x ^= x << param .b ;
233+ return x ;
226234 }
227235 };
228236
@@ -830,7 +838,7 @@ private static long toSafeSeed(final long seed) {
830838 }
831839
832840 @ Override
833- public void setSeed (final long seed ) {
841+ public synchronized void setSeed (final long seed ) {
834842 _x = toSafeSeed ((int )seed );
835843 }
836844
@@ -847,7 +855,7 @@ public String toString() {
847855 @ Override
848856 public int hashCode () {
849857 int hash = 31 ;
850- hash += 17 *_x + 37 ;
858+ hash += 17 *Long . hashCode ( _x ) + 37 ;
851859 hash += 17 *_param .hashCode () + 37 ;
852860
853861 return hash ;
0 commit comments