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 rounding mantissa overflow #541

Merged
merged 9 commits into from
Nov 24, 2022
Merged

Conversation

CAD97
Copy link
Contributor

@CAD97 CAD97 commented Sep 1, 2022

fixes #540

Copy link
Owner

@paupino paupino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding this bug and issuing a fix!

I think this looks good - I have a couple of nits that it'd be good to address first (for my own future sanity reasons!).

One additional thing I think should perhaps be added to this: could you add a couple more benchmarks for these edge cases? I don't think it should make much of a difference, however it'd good to be a little more certain about this. The explicit benchmark we'd want to check is decimal_from_str.

src/str.rs Outdated Show resolved Hide resolved
src/str.rs Outdated Show resolved Hide resolved
src/str.rs Show resolved Hide resolved
src/str.rs Show resolved Hide resolved
src/str.rs Outdated Show resolved Hide resolved
src/str.rs Outdated Show resolved Hide resolved
@paupino paupino merged commit 11be8cd into paupino:master Nov 24, 2022
@CAD97 CAD97 deleted the fix-rounding-overflow branch November 24, 2022 21:20
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.

rounding fails with "Invalid decimal: overflow from mantissa after rounding"
2 participants