From 80384009b319d3bcc8b1dae2bf73343d2514843a Mon Sep 17 00:00:00 2001 From: Luc Maisonobe Date: Sun, 5 Sep 2010 19:42:48 +0000 Subject: [PATCH] fixed checkstyle warnings git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@992879 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/commons/math/dfp/DfpMath.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/math/dfp/DfpMath.java b/src/main/java/org/apache/commons/math/dfp/DfpMath.java index bcf71f21e..719a08a17 100644 --- a/src/main/java/org/apache/commons/math/dfp/DfpMath.java +++ b/src/main/java/org/apache/commons/math/dfp/DfpMath.java @@ -321,7 +321,7 @@ public class DfpMath { int p2 = 0; // Check the arguments somewhat here - if (a.equals(a.getZero()) || a.lessThan(a.getZero()) || (a.equals(a) == false)) { + if (a.equals(a.getZero()) || a.lessThan(a.getZero()) || a.isNaN()) { // negative, zero or NaN a.getField().setIEEEFlagsBits(DfpField.FLAG_INVALID); return a.dotrap(DfpField.FLAG_INVALID, "ln", a, a.newInstance((byte)1, (byte) Dfp.QNAN)); @@ -524,7 +524,7 @@ public class DfpMath { } if (y.equals(one)) { - if (!x.equals(x)) { + if (x.isNaN()) { // Test for NaNs x.getField().setIEEEFlagsBits(DfpField.FLAG_INVALID); return x.dotrap(DfpField.FLAG_INVALID, POW_TRAP, x, x); @@ -532,7 +532,7 @@ public class DfpMath { return x; } - if (!x.equals(x) || !y.equals(y)) { + if (x.isNaN() || y.isNaN()) { // Test for NaNs x.getField().setIEEEFlagsBits(DfpField.FLAG_INVALID); return x.dotrap(DfpField.FLAG_INVALID, POW_TRAP, x, x.newInstance((byte)1, (byte) Dfp.QNAN));