You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2010/09/05 21:42:20 UTC
svn commit: r992878 -
/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/dfp/DfpMath.java
Author: luc
Date: Sun Sep 5 19:42:20 2010
New Revision: 992878
URL: http://svn.apache.org/viewvc?rev=992878&view=rev
Log:
fixed checkstyle warnings
Modified:
commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/dfp/DfpMath.java
Modified: commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/dfp/DfpMath.java
URL: http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/dfp/DfpMath.java?rev=992878&r1=992877&r2=992878&view=diff
==============================================================================
--- commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/dfp/DfpMath.java (original)
+++ commons/proper/math/branches/MATH_2_X/src/main/java/org/apache/commons/math/dfp/DfpMath.java Sun Sep 5 19:42:20 2010
@@ -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));