rem
Returns a BigDecimal whose value is (this % divisor).
The remainder is given by this.minus(this.divideToIntegralValue(divisor).timesLong(divisor)). Note that this is not the modulo operation (the result can be negative).
Return
this % divisor.
Since
1.5
Parameters
value by which this BigDecimal is to be divided.
Throws
if divisor==0
Returns a BigDecimal whose value is (this % divisor), with rounding according to the context settings. The MathContext settings affect the implicit div used to compute the remainder. The remainder computation itself is by definition exact. Therefore, the remainder may contain more than mc.getPrecision() digits.
The remainder is given by this.minus(this.divideToIntegralValue(divisor, mc).timesLong(divisor)). Note that this is not the modulo operation (the result can be negative).
Return
this % divisor, rounded as necessary.
Since
1.5
Parameters
value by which this BigDecimal is to be divided.
the context to use.
See also
.divideToIntegralValue
Throws
if the result is inexact but the rounding mode is UNNECESSARY, or mc._precision> 0 and the result of this.divideToIntgralValue(divisor) would require a _precision of more than mc._precision digits.