-
Notifications
You must be signed in to change notification settings - Fork 42
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
RoundingMode ROUND_HALF_AWAY_FROM_ZERO is not returning the expected value #313
Comments
Sounds reasonable at first glance, I'll take a look at it when time permits, thanks for reporting! |
I had a look at the code, it seems to be decided by this portion of code
If my understanding is correct it should return I suspect the value |
Thanks for looking in to it, you are probably on the right track. I'm in meetings whole day today so I'll have a look at it tomorrow or over the weekend and get back to you so we can fix this. |
You were close to the problem, it was one step above, the |
… some situations, now the discarded part is calculated so that decider digit can be correctly extracted. Fixes #313
When performing a simple division
2/3
withRoundingMode.ROUND_HALF_AWAY_FROM_ZERO
and a scale of 2, I expect the result to be0.67
. However, I get0.66
instead.Steps to Reproduce
I expected to obtain the same result as
java.math.BigDecimal
.Is my understanding of this rounding mode incorrect?
The text was updated successfully, but these errors were encountered: