Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-14 Thread via GitHub
uschindler commented on PR #13723: URL: https://github.com/apache/lucene/pull/13723#issuecomment-2350956051 👍 -- 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

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-14 Thread via GitHub
stefanvodita merged PR #13723: URL: https://github.com/apache/lucene/pull/13723 -- 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-unsubscr...@lucen

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-14 Thread via GitHub
stefanvodita commented on PR #13723: URL: https://github.com/apache/lucene/pull/13723#issuecomment-2350917639 Thank you Mike and Uwe! I opened a separate issue to replace various epsilon-based equality checks (#13789), since that could be a large enough task, and I'll merge this one. --

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-13 Thread via GitHub
stefanvodita commented on code in PR #13723: URL: https://github.com/apache/lucene/pull/13723#discussion_r1759505470 ## lucene/CHANGES.txt: ## @@ -422,7 +422,9 @@ Build Other -(No changes) + +* GITHUB#13720: Add float comparison based on unit of least pr

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-13 Thread via GitHub
uschindler commented on code in PR #13723: URL: https://github.com/apache/lucene/pull/13723#discussion_r1759155851 ## lucene/test-framework/src/java/org/apache/lucene/tests/util/LuceneTestCase.java: ## @@ -864,6 +864,14 @@ public static void assumeNoException(String msg, Excepti

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-13 Thread via GitHub
uschindler commented on code in PR #13723: URL: https://github.com/apache/lucene/pull/13723#discussion_r1759153816 ## lucene/CHANGES.txt: ## @@ -422,7 +422,9 @@ Build Other -(No changes) + +* GITHUB#13720: Add float comparison based on unit of least prec

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-13 Thread via GitHub
stefanvodita commented on PR #13723: URL: https://github.com/apache/lucene/pull/13723#issuecomment-2349071396 I've moved the methods around and, as I was writing more tests, realised I'm not going to be as comprehensive as the originals tests, so I adapted those instead. -- This is an au

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-13 Thread via GitHub
uschindler commented on PR #13723: URL: https://github.com/apache/lucene/pull/13723#issuecomment-2348681854 > > > I don't like the last commit because it changes from a assert-like method to a boolean returning method. > > > > > > I changed it away from an assertion because I like

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-13 Thread via GitHub
mikemccand commented on PR #13723: URL: https://github.com/apache/lucene/pull/13723#issuecomment-2348502055 > > I don't like the last commit because it changes from a assert-like method to a boolean returning method. > > I changed it away from an assertion because I liked this more. I

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-13 Thread via GitHub
mikemccand commented on code in PR #13723: URL: https://github.com/apache/lucene/pull/13723#discussion_r1758531891 ## lucene/test-framework/src/test/org/apache/lucene/tests/util/TestFloatingPointComparisons.java: ## @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Founda

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-12 Thread via GitHub
stefanvodita commented on PR #13723: URL: https://github.com/apache/lucene/pull/13723#issuecomment-2347389307 I changed it away from an assertion because I liked this more. It makes it so you can assert on floats *not* being equal or use their equality in a condition, without making an asse

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-12 Thread via GitHub
uschindler commented on PR #13723: URL: https://github.com/apache/lucene/pull/13723#issuecomment-2346992406 I don't like the last commit because it changes from a assert-like method to a boolean returning method. Could we not keep the previous method signature and still add a test?

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-12 Thread via GitHub
stefanvodita commented on PR #13723: URL: https://github.com/apache/lucene/pull/13723#issuecomment-2346657253 Thank you for the feedback! I've added a comparison method for doubles and a test. -- This is an automated message from the Apache Git Service. To respond to the message, please l

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-11 Thread via GitHub
stefanvodita commented on code in PR #13723: URL: https://github.com/apache/lucene/pull/13723#discussion_r1754952420 ## lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyFacetAssociations.java: ## @@ -654,7 +654,7 @@ private void assertFloatFacetResultsEqual(Lis

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-09 Thread via GitHub
mikemccand commented on PR #13723: URL: https://github.com/apache/lucene/pull/13723#issuecomment-2338279298 > Should we add the "double" variant, too? +1, maybe as follow-on. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to Git

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-06 Thread via GitHub
uschindler commented on code in PR #13723: URL: https://github.com/apache/lucene/pull/13723#discussion_r1746885657 ## lucene/facet/src/test/org/apache/lucene/facet/taxonomy/TestTaxonomyFacetAssociations.java: ## @@ -654,7 +654,7 @@ private void assertFloatFacetResultsEqual(List

Re: [PR] Add unit-of-least-precision float comparison [lucene]

2024-09-06 Thread via GitHub
aherbert commented on code in PR #13723: URL: https://github.com/apache/lucene/pull/13723#discussion_r1746618586 ## lucene/test-framework/src/java/org/apache/lucene/tests/util/LuceneTestCase.java: ## @@ -881,27 +881,30 @@ public static void assumeNoException(String msg, Excepti