[
https://issues.apache.org/jira/browse/LUCENENET-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527087
]
Digy commented on LUCENENET-95:
-------------------------------
I prepared a sample case:
static void Main()
{
float f2 = 0.1f;
float fn = f2;
fn += 1;
fn -= 1;
Console.WriteLine("f2==fn -> " + (f2==fn).ToString());
fn = f2;
}
it outputs true or false depending on the build type(release or debug)
Since all numbers can not be stored exactly when using floating point
representation,
(http://www.yoda.arachsys.com/csharp/floatingpoint.html)
it is safer to apply the SCORE_COMP_THRESH patch
DIGY
> Nunite test for
> Search.TestDisjunctionMaxQuery.TestBooleanOptionalWithTiebreaker
> --------------------------------------------------------------------------------
>
> Key: LUCENENET-95
> URL: https://issues.apache.org/jira/browse/LUCENENET-95
> Project: Lucene.Net
> Issue Type: Bug
> Reporter: Digy
> Priority: Trivial
> Attachments: TryThis.patch
>
>
> Changing the line in TestDisjunctionMaxQuery.cs
> from
> public const float SCORE_COMP_THRESH = 0.0000f;
> to
> public const float SCORE_COMP_THRESH = 0.00001f;
> solves the problem but i am not sure if an exact match is needed or not.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.