Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2134884 | 5.0u8 | Joe Darcy | P3 | Resolved | Fixed | b01 |
The BigDecimal.negate(MathContext) method rounds improperly in some cases. It is implemented as
plus(mc).negate()
i.e. to rounds before negating. This gives the improper result if the rounding mode is asymetric with respect to sign, as round to +infinity and round to -infinity are.
plus(mc).negate()
i.e. to rounds before negating. This gives the improper result if the rounding mode is asymetric with respect to sign, as round to +infinity and round to -infinity are.
- backported by
-
JDK-2134884 BigDecimal.negate(MathContext) method rounds improperly in some cases
-
- Resolved
-