Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1EAFE10544 for ; Tue, 5 May 2015 14:18:52 +0000 (UTC) Received: (qmail 14294 invoked by uid 500); 5 May 2015 14:18:52 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 14234 invoked by uid 500); 5 May 2015 14:18:51 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 14225 invoked by uid 99); 5 May 2015 14:18:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2015 14:18:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B831BE042F; Tue, 5 May 2015 14:18:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: luc@apache.org To: commits@commons.apache.org Message-Id: <2ad023f0585e463e92e3053a80279a98@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [math] Testing only the values that up to now have created problems. Date: Tue, 5 May 2015 14:18:51 +0000 (UTC) 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 Authored: Tue May 5 16:18:35 2015 +0200 Committer: Luc Maisonobe 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 },