toBigInteger

abstract fun toBigInteger(): BigInteger

Converts this BigDecimal to a BigInteger. This conversion is analogous to the narrowing primitive conversion from double to long as defined in The Java Language Specification: any fractional part of this BigDecimal will be discarded. Note that this conversion can lose information about the _precision of the BigDecimal value.

To have an exception thrown if the conversion is inexact (in other words if a nonzero fractional part is discarded), use the BigDecimal.toBigIntegerExact method.

Return

this BigDecimal converted to a BigInteger.