[
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: [email protected]
For additional commands, e-mail: [email protected]