commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject [math] Testing only the values that up to now have created problems.
Date Tue, 05 May 2015 14:18:51 GMT
Repository: commons-math
Updated Branches:
  refs/heads/h10-builds 69c36b34a -> cfb68a07c


Testing only the values that up to now have created problems.

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

Branch: refs/heads/h10-builds
Commit: cfb68a07cc4479b54c8fbbf19cbc9739d9d9892d
Parents: 69c36b3
Author: Luc Maisonobe <luc@apache.org>
Authored: Tue May 5 16:18:35 2015 +0200
Committer: Luc Maisonobe <luc@apache.org>
Committed: Tue May 5 16:18:35 2015 +0200

----------------------------------------------------------------------
 .../org/apache/commons/math4/util/FastMathTest.java  | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/cfb68a07/src/test/java/org/apache/commons/math4/util/FastMathTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/util/FastMathTest.java b/src/test/java/org/apache/commons/math4/util/FastMathTest.java
index 65ca9db..4715a7f 100644
--- a/src/test/java/org/apache/commons/math4/util/FastMathTest.java
+++ b/src/test/java/org/apache/commons/math4/util/FastMathTest.java
@@ -120,6 +120,21 @@ public class FastMathTest {
     }
 
     @Test
+    public void testH10OneHalfPowerPositiveInfinity() {
+        Assert.assertEquals(0.0, FastMath.pow(0.5, Double.POSITIVE_INFINITY), 1.0e-15);
+    }
+
+    @Test
+    public void testH10MinusZeroPowerPositiveInfinity() {
+        Assert.assertEquals(0.0, FastMath.pow(-0.0, Double.POSITIVE_INFINITY), 1.0e-15);
+    }
+
+    @Test
+    public void testH10MinusZeroPowerNaN() {
+        Assert.assertTrue(Double.isNaN(FastMath.pow(-0.0, Double.NaN)));
+    }
+
+    @Test
     public void testMinMaxDouble() {
         double[][] pairs = {
             { -50.0, 50.0 },


Mime
View raw message