toLongExact

abstract fun toLongExact(): Long

Converts this BigInteger to a long, checking for lost information. If the value of this BigInteger is out of the range of the long type, then an ArithmeticException is thrown.

Return

this BigInteger converted to a long.

Since

1.8

See also

Throws

if the value of this will not exactly fit in a long.