You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/08/10 21:58:36 UTC

[GitHub] [commons-numbers] aherbert commented on a change in pull request #103: Simplify boolean expressions with an simpler and equivalent.

aherbert commented on a change in pull request #103:
URL: https://github.com/apache/commons-numbers/pull/103#discussion_r686349494



##########
File path: commons-numbers-core/src/main/java/org/apache/commons/numbers/core/Precision.java
##########
@@ -182,7 +182,7 @@ public static boolean equalsIncludingNaN(float x, float y) {
         final boolean yIsNan = Float.isNaN(y);
         // Combine the booleans with bitwise OR
         return (xIsNan | yIsNan) ?
-            !(xIsNan ^ yIsNan) :
+                xIsNan == yIsNan :

Review comment:
       The formatting looks wrong here as you have 8 character indent and then a 4 character indent on the line underneath. It should be:
   ```java
           return (xIsNan | yIsNan) ?
               xIsNan == yIsNan :
               equals(x, y, maxUlps);
   ```




-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org