Open
Description
Using the scale method on a BigDecimal can throw the "Negative decimal precision is not allowed." exception even if the new scale satisfies that condition.
val b = BigDecimal.fromDouble(
0.05,
decimalMode = DecimalMode(
decimalPrecision = 5,
roundingMode = RoundingMode.ROUND_HALF_FLOOR,
scale = 6
)
)
val c = b.scale(2) // <- Throws here?
Metadata
Metadata
Assignees
Labels
No labels