You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2011/04/12 13:46:20 UTC

svn commit: r1091378 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java

Author: erans
Date: Tue Apr 12 11:46:20 2011
New Revision: 1091378

URL: http://svn.apache.org/viewvc?rev=1091378&view=rev
Log:
MATH-559
Removed "assert" statements.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java?rev=1091378&r1=1091377&r2=1091378&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java Tue Apr 12 11:46:20 2011
@@ -515,10 +515,6 @@ public final class MathUtils {
      * @since 2.2
      */
     public static boolean equals(float x, float y, int maxUlps) {
-        // Check that "maxUlps" is non-negative and small enough so that
-        // NaN won't compare as equal to anything (except another NaN).
-        assert maxUlps > 0 && maxUlps < NAN_GAP;
-
         int xInt = Float.floatToIntBits(x);
         int yInt = Float.floatToIntBits(y);
 
@@ -675,10 +671,6 @@ public final class MathUtils {
      * point values between {@code x} and {@code y}.
      */
     public static boolean equals(double x, double y, int maxUlps) {
-        // Check that "maxUlps" is non-negative and small enough so that
-        // NaN won't compare as equal to anything (except another NaN).
-        assert maxUlps > 0 && maxUlps < NAN_GAP;
-
         long xInt = Double.doubleToLongBits(x);
         long yInt = Double.doubleToLongBits(y);