toInteger

fun Number.toInteger(): BigInteger

Converts this number into an arbitrary-precision BigInteger, by parsing its String representation. Should only be called when isInteger is true.

Throws

if this number's String representation is not a valid integer literal