toLong

fun toLong(): Long

Converts this BigInteger to a long. This conversion is analogous to a narrowing primitive conversion from long to int as defined in <cite>The Java Language Specification</cite>: if this BigInteger is too big to fit in a long, only the low-order 64 bits are returned. Note that this conversion can lose information about the overall magnitude of the BigInteger value as well as return a result with the opposite sign.

Return

this BigInteger converted to a long.

See also

.toLongExact