Skip to content

Fix incorrect calculation of decimal modulo - #258

Merged
mwoss merged 1 commit into
masterfrom
mod-fix
Oct 21, 2021
Merged

Fix incorrect calculation of decimal modulo#258
mwoss merged 1 commit into
masterfrom
mod-fix

Conversation

@mwoss

@mwoss mwoss commented Oct 21, 2021

Copy link
Copy Markdown
Member

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.

1 participant