commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1075040 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/function/LogitTest.java
Date Sun, 27 Feb 2011 12:41:49 GMT
Author: erans
Date: Sun Feb 27 12:41:48 2011
New Revision: 1075040

URL: http://svn.apache.org/viewvc?rev=1075040&view=rev
Log:
Minor change in tolerance setting.

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/function/LogitTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/function/LogitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/function/LogitTest.java?rev=1075040&r1=1075039&r2=1075040&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/function/LogitTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/analysis/function/LogitTest.java
Sun Feb 27 12:41:48 2011
@@ -161,10 +161,11 @@ public class LogitTest {
         
         for (int i = 0; i < 10; i++) {
             final double x = lo + Math.random() * (hi - lo);
-            Assert.assertEquals(dfdx.value(x), chain.value(x), 1e-13);
+            final double r = dfdx.value(x);
+            Assert.assertEquals(r, chain.value(x), r * 1e-15);
         }
 
-        Assert.assertEquals(dfdx.value(lo), chain.value(lo), EPS);
-        Assert.assertEquals(dfdx.value(hi), chain.value(hi), EPS);
+        Assert.assertEquals(dfdx.value(lo), chain.value(lo), 0); // -inf
+        Assert.assertEquals(dfdx.value(hi), chain.value(hi), 0); // +inf
     }
 }



Mime
View raw message