aherbert commented on code in PR #113:
URL: https://github.com/apache/commons-rng/pull/113#discussion_r883102742


##########
commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/ContinuousUniformSampler.java:
##########
@@ -196,17 +196,10 @@ private static boolean validateOpenInterval(double lo, 
double hi) {
             // (MAX_VALUE has all bits set except the most significant sign 
bit.)
             bitsx &= Long.MAX_VALUE;
             bitsy &= Long.MAX_VALUE;
-            if (lessThanUnsigned(bitsx + bitsy, MIN_ULP_OPPOSITE_SIGN)) {
-                return false;
-            }
-        } else {
-            // Same signs, subtraction will count the ULP difference.
-            // This should be above 1.
-            if (Math.abs(bitsx - bitsy) < MIN_ULP_SAME_SIGN) {
-                return false;
-            }
+            return !lessThanUnsigned(bitsx + bitsy, MIN_ULP_OPPOSITE_SIGN);
         }
-        return true;
+        // maintain existing comment ...

Review Comment:
   The `maintain existing comment ...` was shorthand for leaving the existing 
comment in place. So please put it back:
   ```Java
       // Same signs, subtraction will count the ULP difference.
       // This should be above 1.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to