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: decimal round_dp on zero with too large dp #575

Merged
merged 4 commits into from
Feb 9, 2023

Conversation

jon-chuang
Copy link
Contributor

@jon-chuang jon-chuang commented Feb 9, 2023

Let us start with regression test and work our way to a fix

(There is no fix, but we should panic early rather than silently error)

@jon-chuang jon-chuang changed the title fix: too many DP fix: panic early on too many DP Feb 9, 2023
@jon-chuang
Copy link
Contributor Author

jon-chuang commented Feb 9, 2023

Actually, that was not the correct fix. We don't even have to panic, we can rely on the invariant.

@jon-chuang jon-chuang changed the title fix: panic early on too many DP fix: decimal round_dp on zero with too large dp Feb 9, 2023
@paupino
Copy link
Owner

paupino commented Feb 9, 2023

Thank you for fixing this - it's a good catch.

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

2 participants