public BigInteger[] divideAndRemainder (BigInteger val)

Returns an array of two BigIntegers containing (this / val) followed by (this % val).

Parameters:
val    value by which this BigInteger is to be divided, and the remainder computed.

Returns:  an array of two BigIntegers: the quotient (this / val) is the initial element, and the remainder (this % val) is the final element.

Exceptions:
ArithmeticException    if val is zero.