commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [commons-rng] grimreaper commented on a change in pull request #29: RNG-81: NumberFactory to sample all rationals between 0 and 1.
Date Sun, 17 Mar 2019 12:23:56 GMT
grimreaper commented on a change in pull request #29: RNG-81: NumberFactory to sample all rationals
between 0 and 1.
URL: https://github.com/apache/commons-rng/pull/29#discussion_r266236883
 
 

 ##########
 File path: commons-rng-core/src/test/java/org/apache/commons/rng/core/util/NumberFactoryTest.java
 ##########
 @@ -156,9 +156,9 @@ public void testFloatGenerationMethods() {
         assertCloseToNotAbove1(Float.intBitsToFloat(0x7f << 23 | allBits >>>
9) - 1.0f, 2);
 
         final int noBits = 0;
-        Assert.assertEquals(0, (noBits >>> 9) * 0x1.0p-23f, 0);
-        Assert.assertEquals(0, (noBits >>> 8) * 0x1.0p-24f, 0);
-        Assert.assertEquals(0, Float.intBitsToFloat(0x7f << 23 | noBits >>>
9) - 1.0f, 0);
+        Assert.assertEquals(0f, (noBits >>> 9) * 0x1.0p-23f, 0);
+        Assert.assertEquals(0f, (noBits >>> 8) * 0x1.0p-24f, 0);
+        Assert.assertEquals(0f, Float.intBitsToFloat(0x7f << 23 | noBits >>>
9) - 1.0f, 0);
 
 Review comment:
   ```SUGGESTION
           Assert.assertEquals(0.0f, Float.intBitsToFloat(0x7f << 23 | noBits >>>
9) - 1.0f, 0);
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message