Skip to content

Handle float operation errors when using divmod #261

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

Merged
merged 6 commits into from
Sep 13, 2023

Conversation

azubieta
Copy link
Contributor

@azubieta azubieta commented Sep 5, 2023

closes #259

azubieta and others added 5 commits September 4, 2023 18:46
…alue of multipleOf

When float numbers are involved in a divmod operation the Remainder may be a number close to 0 or to the Divisor and both scenarios mean that the Divisor is a perfect divisor of the dividend.
this will work as long as the numbers are larger than 0.0000000000000001
@cwacek
Copy link
Owner

cwacek commented Sep 12, 2023

@azubieta see the change I made. If the tests pass I'll merge this version.

@azubieta
Copy link
Contributor Author

@cwacek using Decimal does the job. I just fixed a small typo. Looks good from my side

@cwacek cwacek merged commit abf38dd into cwacek:master Sep 13, 2023
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.

Unprecise comparizon with zero of float values
2 participants