HaraldKi commented on code in PR #138:
URL: https://github.com/apache/commons-numbers/pull/138#discussion_r1341930545
##########
commons-numbers-core/src/main/java/org/apache/commons/numbers/core/DD.java:
##########
@@ -1924,6 +1924,18 @@ public DD pow(int n) {
return computePow(x, xx, n);
}
+ /** {@inheritDoc} */
+ @Override
+ public boolean isZero() {
+ return equals(0.0, x) && equals(0.0, xx);
Review Comment:
Good hint. I found the -0.0 thing indeed confusing in the equals methods,
but this is not the PR to change that. But surely isZero should return true for
any kind of zero indeed :-). I'll fix it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]