Closed MrStahlfelge closed 1 year ago
Describe the bug moveDecimalPoint(9) gives wrong results for some BigDecimals.
To Reproduce The following Unit Test demonstrates the problem:
val bigDecimal = "1.123456780".toBigDecimal() assertEquals(112345678L, bigDecimal.moveDecimalPoint(8).longValue()) assertEquals(11234567800L, bigDecimal.moveDecimalPoint(10).longValue()) assertEquals(1123456780L, bigDecimal.moveDecimalPoint(9).longValue())
It fails on the last line.
Expected behavior Unit Test completing successful.
It works when providing a DecimalMode with a scale.
Platform
Describe the bug moveDecimalPoint(9) gives wrong results for some BigDecimals.
To Reproduce The following Unit Test demonstrates the problem:
It fails on the last line.
Expected behavior Unit Test completing successful.
It works when providing a DecimalMode with a scale.
Platform