Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3F92A200BE2 for ; Thu, 15 Dec 2016 18:57:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3E31B160B15; Thu, 15 Dec 2016 17:57:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B2FD0160B13 for ; Thu, 15 Dec 2016 18:57:00 +0100 (CET) Received: (qmail 60977 invoked by uid 500); 15 Dec 2016 17:56:59 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 60966 invoked by uid 99); 15 Dec 2016 17:56:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Dec 2016 17:56:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 6B0A22C03DE for ; Thu, 15 Dec 2016 17:56:58 +0000 (UTC) Date: Thu, 15 Dec 2016 17:56:58 +0000 (UTC) From: "Dawid Weiss (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LUCENE-7594) Float/DoublePoint should not recommend using Math.nextUp/nextDown for exclusive ranges MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 15 Dec 2016 17:57:01 -0000 [ https://issues.apache.org/jira/browse/LUCENE-7594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15752029#comment-15752029 ] Dawid Weiss commented on LUCENE-7594: ------------------------------------- I checked and javac doesn't recognize it as a static expression, for example: {code} 10: ldc #31 // float -0.0f 12: invokestatic #27 // Method java/lang/Float.floatToIntBits:(F)I {code} very likely it'd be optimized away later in hotspot, but any of the alternatives I mentioned are just as good. > Float/DoublePoint should not recommend using Math.nextUp/nextDown for exclusive ranges > -------------------------------------------------------------------------------------- > > Key: LUCENE-7594 > URL: https://issues.apache.org/jira/browse/LUCENE-7594 > Project: Lucene - Core > Issue Type: Bug > Reporter: Adrien Grand > Priority: Minor > Attachments: LUCENE-7594.patch > > > Float/Double points are supposed to be consistent with Double/Float.compare, so +0 is supposed to compare greater than -0. However Math.nextUp/nextDown is not consistent with Double/Float.compare and returns MIN_VALUE for nextUp(-0). -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org