Repository: commons-math Updated Branches: refs/heads/master ccd0fd51a -> d98897b11
Revert back temporary changes. Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/d98897b1 Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/d98897b1 Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/d98897b1 Branch: refs/heads/master Commit: d98897b11e6f4adf1d0a91591b1bb6be501cd29e Parents: ccd0fd5 Author: tn <thomas.neidh...@gmail.com> Authored: Wed Feb 25 17:45:07 2015 +0100 Committer: tn <thomas.neidh...@gmail.com> Committed: Wed Feb 25 17:45:07 2015 +0100 ---------------------------------------------------------------------- .../java/org/apache/commons/math4/util/FastMath.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-math/blob/d98897b1/src/main/java/org/apache/commons/math4/util/FastMath.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math4/util/FastMath.java b/src/main/java/org/apache/commons/math4/util/FastMath.java index 052c7eb..24bb857 100644 --- a/src/main/java/org/apache/commons/math4/util/FastMath.java +++ b/src/main/java/org/apache/commons/math4/util/FastMath.java @@ -1468,11 +1468,6 @@ public class FastMath { return x; } - // special case #3 described in javadoc of Math.pow(double, double) - if (y != y) { // Y is NaN - return y; - } - if (x == 0) { long bits = Double.doubleToRawLongBits(x); if ((bits & 0x8000000000000000L) != 0) { @@ -1514,8 +1509,7 @@ public class FastMath { return Double.NaN; } - // TEMP: was x * x > 1.0 - if (abs(x) > 1.0) { + if (x * x > 1.0) { return Double.POSITIVE_INFINITY; } else { return 0.0; @@ -1552,8 +1546,7 @@ public class FastMath { return Double.NaN; } - // TEMP: was x * x < 1.0 - if (abs(x) < 1.0) { + if (x * x < 1.0) { return Double.POSITIVE_INFINITY; } else { return 0.0;