-
Notifications
You must be signed in to change notification settings - Fork 634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLR-16361 'mod' function query casts to float, returns wrong modulus for large ints #989
Conversation
Any chance of a unit test demonstrating the problem? It looks like all reasonable Java code, but it would help me see the unit test demonstrating the problem, and then the fix! |
Added a large int cast to float and double to demonstrate the difference/issue, and a unit test for the new mod impl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Can you add a CHANGES.txt entry under 9.1 improvements -- like "mod() is now accurate with even higher integers above 123456789"
Thanks! Added entry to CHANGES.txt |
… for large ints (#989) * use double instead of float Co-authored-by: Dan Rosher <d.rosher@cv-library.co.uk>
https://issues.apache.org/jira/browse/SOLR-16361
Description
use double instead of float for mod function query
Solution
use double instead of float for mod function query
Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.