You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2011/02/23 18:19:38 UTC

[jira] Updated: (LUCENE-2937) small float underflow detection bug

     [ https://issues.apache.org/jira/browse/LUCENE-2937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley updated LUCENE-2937:
---------------------------------

    Attachment: LUCENE-2937.patch

Here's a patch - the fix to SmallFloat turned out easier than I thought, and since we are working with the exponent and mantissa together, doesn't slow down the code at all (the less-than is just changed to a less-than-or-equals).

I also re-ran TestSmallFloat.testAllFloats() to both verify that SmallFloat matches the original floatToByte after that was also fixed, and verified that no positive float maps to byte #0

> small float underflow detection bug
> -----------------------------------
>
>                 Key: LUCENE-2937
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2937
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 1.9
>            Reporter: Yonik Seeley
>            Priority: Minor
>         Attachments: LUCENE-2937.patch
>
>
> Underflow detection in small floats has a bug, and can incorrectly result in a byte value of 0 for a non-zero float.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org