toBigDecimal

inline fun BigInteger.toBigDecimal(): BigDecimal (source)

Platform and version requirements: Kotlin 1.2, JVM

Returns the value of this BigInteger number as a BigDecimal.

inline fun BigInteger.toBigDecimal(
    scale: Int = 0,
    mathContext: MathContext = MathContext.UNLIMITED
): BigDecimal
(source)

Platform and version requirements: Kotlin 1.2, JVM

Returns the value of this BigInteger number as a BigDecimal scaled according to the specified scale and rounded according to the settings specified with mathContext.

Parameters

scale - the scale of the resulting BigDecimal, i.e. number of decimal places of the fractional part. By default 0.