Describe the bug
Seems that when it comes to negative values rounding mode ROUND_HALF_TO_EVEN and ROUND_HALF_TO_ODD works
just by rounding half to negative infinite -1.005 to -1.01, -1.015 to -1.02 and so on.
Expected behavior
RoundingMode.ROUND_HALF_TO_EVEN, scale 2
In my understading in this mode
-1.005 should round to -1.00 because 0 is closer even number
but in this case the result is -1.01
-1.015 should round to -1.02 because 2 is closer even number and the result is correct
1.005 should round to 1.00 because 0 is closer even number and the result is correct
1.015 should round to 1.02 because 2 is closer even number and the result is correct
Platform
JVM
Additional context
I belive this is a bug because java java.math.RoundingMode.HALF_EVEN works as expected.
This seems not to be the case with positive values.
Describe the bug Seems that when it comes to negative values rounding mode ROUND_HALF_TO_EVEN and ROUND_HALF_TO_ODD works just by rounding half to negative infinite -1.005 to -1.01, -1.015 to -1.02 and so on.
To Reproduce
Expected behavior RoundingMode.ROUND_HALF_TO_EVEN, scale 2 In my understading in this mode -1.005 should round to -1.00 because 0 is closer even number but in this case the result is -1.01 -1.015 should round to -1.02 because 2 is closer even number and the result is correct 1.005 should round to 1.00 because 0 is closer even number and the result is correct 1.015 should round to 1.02 because 2 is closer even number and the result is correct
Platform
Additional context I belive this is a bug because java java.math.RoundingMode.HALF_EVEN works as expected. This seems not to be the case with positive values.