From issues-return-72670-archive-asf-public=cust-asf.ponee.io@commons.apache.org Sun Mar 17 12:23:58 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3842E18078F for ; Sun, 17 Mar 2019 13:23:58 +0100 (CET) Received: (qmail 51072 invoked by uid 500); 17 Mar 2019 12:23:57 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 51008 invoked by uid 99); 17 Mar 2019 12:23:57 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Mar 2019 12:23:57 +0000 From: GitBox To: issues@commons.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. Message-ID: <155282543652.2951.4117371112838349991.gitbox@gitbox.apache.org> Date: Sun, 17 Mar 2019 12:23:56 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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_r266236835 ########## 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); Review comment: nitpick: if you're changing the first argument anyways use the canonical form ```SUGGESTION Assert.assertEquals(0.0f, (noBits >>> 9) * 0x1.0p-23f, 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