You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/04/29 01:11:07 UTC

[GitHub] [lucene] gsmiller commented on a diff in pull request #848: LUCENE-10530: Avoid floating point precision bug in TestTaxonomyFacetAssociations

gsmiller commented on code in PR #848:
URL: https://github.com/apache/lucene/pull/848#discussion_r861408137


##########
lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyFacetAssociations.java:
##########
@@ -500,10 +500,7 @@ private void validateFloats(
       assertNull(facetResult);
     } else {
       assertEquals(dim, facetResult.dim);
-      // We can expect the floats to be exactly equal here since we're ensuring that we sum them
-      // in the same order when determining expected values and when computing facets. See
-      // LUCENE-10530:
-      assertEquals(aggregatedValue, facetResult.value.floatValue(), 0f);
+      assertEquals(aggregatedValue, facetResult.value.floatValue(), 1f);

Review Comment:
   Thanks for sharing!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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