Skip to content
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

Fix incorrect calculation of decimal modulo #258

Merged
merged 1 commit into from Oct 21, 2021
Merged

Fix incorrect calculation of decimal modulo #258

merged 1 commit into from Oct 21, 2021

Conversation

mwoss
Copy link
Member

@mwoss mwoss commented Oct 21, 2021

This PR address the bug from the issue #210.
The quotient was improperly calculated due to incorrect division precision. By default decimal.Div rounds decimal to DivisionPrecision places after a comma and thus for some specific cases div.Mod was not working as supposed to. Using explicit -d.exp+1 round precision should fix this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant