Describe the bug
Converting from Double to BigDecimal while specifying a scale works different compared with String to BigDecimal.
To Reproduce
Steps to reproduce the behavior:
val decimalMode = DecimalMode(
scale = 2,
roundingMode = RoundingMode.ROUND_HALF_TO_EVEN,
)
val a = 1234.0.toBigDecimal(decimalMode = decimalMode)
val b = "1234.0".toBigDecimal(decimalMode = decimalMode)
println(a)
println(b)
This prints:
Expected behavior
I would expect this to print:
Platform
JVM
If JS (please complete the following information):
If Smartphone (please complete the following information):
Additional context