Closed tadfisher closed 3 years ago
Describe the bug
abs() and negate() both preserve decimalMode, but unaryMinus() does not, which is unexpected.
abs()
negate()
decimalMode
unaryMinus()
To Reproduce Steps to reproduce the behavior:
val value = "20.11".toBigDecimal(decimalMode = DecimalMode.US_CURRENCY) value.negate().decimalMode // DecimalMode(decimalPrecision=4, roundingMode=ROUND_HALF_AWAY_FROM_ZERO, scale=2) (-value).decimalMode // null
Expected behavior Perhaps naively, I expect negate() to be synonymous with unaryMinus().
Platform JVM
Thanks for reporting the issue @tadfisher ! The fix will be available in 0.3.2-SNAPSHOT build once the build is complete in an hour or two
Describe the bug
abs()
andnegate()
both preservedecimalMode
, butunaryMinus()
does not, which is unexpected.To Reproduce Steps to reproduce the behavior:
Expected behavior Perhaps naively, I expect
negate()
to be synonymous withunaryMinus()
.Platform JVM