-
New Feature
-
Resolution: Fixed
-
Normal
-
5.0.10
-
Security Level: Jimmy
-
None
java
double d = 1.239; DecimalFormat df = new DecimalFormat("#.##"); df.setRoundingMode(RoundingMode.UNNECESSARY); System.out.print(df.format(d));
it will throw an java.lang.ArithmeticException: Rounding needed with the rounding mode being set to RoundingMode.UNNECESSARY
<decimalbox format="#.##" width="150px" roundingMode="UNNECESSARY"/>
type 1.239, it will round to 1.24
numfmt.js
line: 82
shall handle UNNECESSARY case