public BigDecimal divide (BigDecimal divisor, int scale, RoundingMode roundingMode)

Returns a BigDecimal whose value is (this / divisor), and whose scale is as specified. If rounding must be performed to generate a result with the specified scale, the specified rounding mode is applied.

Parameters:
divisor    value by which this BigDecimal is to be divided.
scale    scale of the BigDecimal quotient to be returned.
roundingMode    rounding mode to apply.

Returns:  this / divisor

Exceptions:
ArithmeticException    if divisor is zero, roundingMode==RoundingMode.UNNECESSARY and the specified scale is insufficient to represent the result of the division exactly.

Since:  1.5