Java: Convert from BigInteger to long
BigInteger bigInt = ... long l = bigInt.longValue()
Note that this simply discards all but the lowest 64 bits. If the
BigInteger is outside of the range −9,223,372,036,854,775,808…9,223,372,036,854,775,807 the conversion my have unexpected results.
Be the first to comment!