You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2016/01/17 11:41:59 UTC

[10/22] [math] Reverting commit 8d6d088622f8e4ea89e66ccbe097510fb4c932fd as per Gilles request.

Reverting commit 8d6d088622f8e4ea89e66ccbe097510fb4c932fd as per Gilles request.

The work on revamping the random packages is perfoemd in the random-ravamp branch.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/16f46dcc
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/16f46dcc
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/16f46dcc

Branch: refs/heads/master
Commit: 16f46dcc3df28afa0231fa68a6f43ec9ca44b0d1
Parents: cf82e4c
Author: Luc Maisonobe <lu...@apache.org>
Authored: Sun Jan 17 11:35:24 2016 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Sun Jan 17 11:40:27 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/commons/math4/random/BaseRandomGenerator.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/16f46dcc/src/main/java/org/apache/commons/math4/random/BaseRandomGenerator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/random/BaseRandomGenerator.java b/src/main/java/org/apache/commons/math4/random/BaseRandomGenerator.java
index da801b0..2d78005 100644
--- a/src/main/java/org/apache/commons/math4/random/BaseRandomGenerator.java
+++ b/src/main/java/org/apache/commons/math4/random/BaseRandomGenerator.java
@@ -120,7 +120,7 @@ public abstract class BaseRandomGenerator
             int bits;
             int val;
             do {
-                bits = nextInt() >>> 1;
+                bits = (nextInt() >>> 1);
                 val = bits % n;
             } while (bits - val + (n - 1) < 0);
             return val;