lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From laimis <...@git.apache.org>
Subject [GitHub] lucenenet pull request: detect NaN and return appropriate value
Date Sun, 19 Apr 2015 00:49:49 GMT
GitHub user laimis opened a pull request:

    https://github.com/apache/lucenenet/pull/129

    detect NaN and return appropriate value

    Lucene.Net versions of FloatToIntBits and DoubleToLongBits are returning incorrect values
if the input is NaN. It seems like it returns correct values in all other cases but in NaN
returns negative of what it should. Added code to detect if the input is NaN and return the
value that matches Lucene version and what is specified in Java docs: 
    
    https://docs.oracle.com/javase/7/docs/api/java/lang/Float.html#floatToIntBits(float)
    https://docs.oracle.com/javase/7/docs/api/java/lang/Double.html#doubleToLongBits(double)
    
    This passes TestNumericRangeQuery32/64 failing tests.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/laimis/lucenenet numericutil_fixes

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucenenet/pull/129.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #129
    
----
commit dedfe73be77d4779a131a01a41425ef7738ec909
Author: Laimonas Simutis <laimis@gmail.com>
Date:   2015-04-19T00:46:04Z

    detect NaN and return appropriate value

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message