Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1
-
None
-
None
-
None
-
Win2K, Sun JDK1.5.0_05 b05
Description
MathUtils.round(39.245, 2) results 39.24, however it should be 39.25, with default rounding mode BigDecimal.ROUND_HALF_UP.
I found that internally MathUtils.round multiplies the given number by 10^scale.
39.245 * 100.0 results 3924.49999...5 , and after this the calculation is not correct any more.
Attachments
Attachments
Issue Links
- relates to
-
NUMBERS-199 Method "round "in class "Precision"
- Closed