Package-level declarations

Types

Link copied to clipboard

Represents an arbitrary-sized Big Integer.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A BigInt exception thrown when trying to divide by zero

Link copied to clipboard
open class BigIntException(message: String) : Throwable

A generic BigInt exception

Link copied to clipboard

A BigInt exception thrown when an invalid String value is provided while parsing

Link copied to clipboard

A BigInt exception thrown when doing a pow operation with a negative exponent

Link copied to clipboard

A BigInt exception thrown when an overflow operation occurs, like for example when trying to convert a too big BigInt into an Int

Link copied to clipboard
class BigNum(val int: BigInt, val scale: Int) : Comparable<BigNum>

Represents a BigNum, a numeric value with decimal places that is exact.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class JvmBigInt(val value: <Error class: unknown class>) : BigInt, BigIntConstructor
Link copied to clipboard

Properties

Link copied to clipboard

Converts this into a BigInt

val <Error class: unknown class>.bi: JvmBigInt

Converts a BigInteger into a BigInt (JvmBigInt)

Link copied to clipboard

Converts this into a BigNum

Functions

Link copied to clipboard
fun String.bi(radix: Int): BigInt

Converts this into a BigInt using a specific radix, that is the base to use. radix=10 for decimal, radix=16 for hexadecimal

Link copied to clipboard
fun BigInt(value: Int): BigInt
fun BigInt(value: Long): BigInt
fun BigInt(value: String): BigInt
fun BigInt(value: String, radix: Int): BigInt
Link copied to clipboard
fun BigInt.toBigInteger(): <Error class: unknown class>

Converts a BigInt into a BigInteger