- newScale
- scale of the result returned.
Documentation for this section has not yet been entered.
Type Reason Java.Lang.ArithmeticException if rounding would be necessary.
Returns a new BigDecimal instance with the specified scale. If the new scale is greater than the old scale, then additional zeros are added to the unscaled value. If the new scale is smaller than the old scale, then trailing zeros are removed. If the trailing digits are not zeros then an ArithmeticException is thrown.
If no exception is thrown, then the following equation holds: x.setScale(s).compareTo(x) == 0.