lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From laimis <>
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:

    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: 
    This passes TestNumericRangeQuery32/64 failing tests.

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

    $ git pull numericutil_fixes

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

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 <>
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 or file a JIRA ticket
with INFRA.

View raw message