BigInt

interface BigInt

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun abs(): BigInt
Link copied to clipboard
abstract infix fun and(value: BigInt): BigInt
Link copied to clipboard
abstract infix fun andNot(value: BigInt): BigInt
Link copied to clipboard
abstract fun bitCount(): Int
Link copied to clipboard
abstract fun bitLength(): Int
Link copied to clipboard
abstract operator fun div(rhs: BigInt): BigInt
Link copied to clipboard
abstract fun divideAndRemainder(value: BigInt): Pair<BigInt, BigInt>
Link copied to clipboard
abstract fun fitsByte(): Boolean

Tests whether the value contained within this BigInt could safely fit type Byte without overflow.

Link copied to clipboard
abstract fun fitsInt(): Boolean

Tests whether the value contained within this BigInt could safely fit type Int without overflow.

Link copied to clipboard
abstract fun fitsLong(): Boolean

Tests whether the value contained within this BigInt could safely fit type Long without overflow.

Link copied to clipboard
abstract fun fitsShort(): Boolean

Tests whether the value contained within this BigInt could safely fit type Short without overflow.

Link copied to clipboard
abstract fun fitsUByte(): Boolean
Link copied to clipboard
abstract fun fitsUInt(): Boolean
Link copied to clipboard
abstract fun fitsULong(): Boolean
Link copied to clipboard
abstract fun fitsUShort(): Boolean
Link copied to clipboard
abstract fun getLowestSetBit(): Int
Link copied to clipboard
abstract fun inv(): BigInt
Link copied to clipboard
abstract operator fun minus(rhs: BigInt): BigInt
Link copied to clipboard
abstract infix fun or(value: BigInt): BigInt
Link copied to clipboard
abstract operator fun plus(rhs: BigInt): BigInt

Returns a new BigInt wrapping the sum of the value of this BigInt and the value of rhs.

Link copied to clipboard
abstract infix fun pow(exponent: Int): BigInt
Link copied to clipboard
abstract operator fun rem(rhs: BigInt): BigInt
Link copied to clipboard
abstract infix fun shl(n: Int): BigInt
Link copied to clipboard
abstract infix fun shr(n: Int): BigInt
Link copied to clipboard
abstract fun square(): BigInt
Link copied to clipboard
abstract operator fun times(rhs: BigInt): BigInt
Link copied to clipboard
abstract fun toByte(): Byte

Unwraps the value contained within this BigInt as a Byte value.

Link copied to clipboard
abstract fun toInt(): Int

Unwraps the value contained within this BigInt as a Int value.

Link copied to clipboard
abstract fun toLong(): Long

Unwraps the value contained within this BigInt as a Long value.

Link copied to clipboard
abstract fun toShort(): Short

Unwraps the value contained within this BigInt as a Short value.

Link copied to clipboard
abstract fun toString(radix: Int): String
Link copied to clipboard
abstract fun toUByte(): UByte
Link copied to clipboard
abstract fun toUInt(): UInt
Link copied to clipboard
abstract fun toULong(): ULong
Link copied to clipboard
abstract fun toUShort(): UShort
Link copied to clipboard
abstract operator fun unaryMinus(): BigInt
Link copied to clipboard
abstract infix fun xor(value: BigInt): BigInt

Properties

Link copied to clipboard
abstract val isNegative: Boolean

true if this BigInt represents a negative, non-zero number.

Link copied to clipboard
abstract val isPositive: Boolean

true if this BigInt represents a positive, non-zero number.

Link copied to clipboard
abstract val isZero: Boolean

true if this BigInt is equal to 0.

Extensions

Link copied to clipboard
infix inline fun BigInt.and(rhs: Byte): BigInt
infix inline fun BigInt.and(rhs: Short): BigInt
infix inline fun BigInt.and(rhs: Int): BigInt
infix inline fun BigInt.and(rhs: Long): BigInt
infix inline fun BigInt.and(rhs: UByte): BigInt
infix inline fun BigInt.and(rhs: UShort): BigInt
infix inline fun BigInt.and(rhs: UInt): BigInt
infix inline fun BigInt.and(rhs: ULong): BigInt
Link copied to clipboard
infix inline fun BigInt.andNot(rhs: Byte): BigInt
infix inline fun BigInt.andNot(rhs: Short): BigInt
infix inline fun BigInt.andNot(rhs: Int): BigInt
infix inline fun BigInt.andNot(rhs: Long): BigInt
infix inline fun BigInt.andNot(rhs: UByte): BigInt
infix inline fun BigInt.andNot(rhs: UShort): BigInt
infix inline fun BigInt.andNot(rhs: UInt): BigInt
infix inline fun BigInt.andNot(rhs: ULong): BigInt
Link copied to clipboard
inline operator fun BigInt.div(rhs: Byte): BigInt
inline operator fun BigInt.div(rhs: Short): BigInt
inline operator fun BigInt.div(rhs: Int): BigInt
inline operator fun BigInt.div(rhs: Long): BigInt
inline operator fun BigInt.div(rhs: UByte): BigInt
inline operator fun BigInt.div(rhs: UShort): BigInt
inline operator fun BigInt.div(rhs: UInt): BigInt
inline operator fun BigInt.div(rhs: ULong): BigInt
Link copied to clipboard
inline operator fun BigInt.minus(rhs: Byte): BigInt
inline operator fun BigInt.minus(rhs: Short): BigInt
inline operator fun BigInt.minus(rhs: Int): BigInt
inline operator fun BigInt.minus(rhs: Long): BigInt
inline operator fun BigInt.minus(rhs: UByte): BigInt
inline operator fun BigInt.minus(rhs: UShort): BigInt
inline operator fun BigInt.minus(rhs: UInt): BigInt
inline operator fun BigInt.minus(rhs: ULong): BigInt
Link copied to clipboard
infix inline fun BigInt.or(rhs: Byte): BigInt
infix inline fun BigInt.or(rhs: Short): BigInt
infix inline fun BigInt.or(rhs: Int): BigInt
infix inline fun BigInt.or(rhs: Long): BigInt
infix inline fun BigInt.or(rhs: UByte): BigInt
infix inline fun BigInt.or(rhs: UShort): BigInt
infix inline fun BigInt.or(rhs: UInt): BigInt
infix inline fun BigInt.or(rhs: ULong): BigInt
Link copied to clipboard
inline operator fun BigInt.plus(rhs: Byte): BigInt
inline operator fun BigInt.plus(rhs: Short): BigInt
inline operator fun BigInt.plus(rhs: Int): BigInt
inline operator fun BigInt.plus(rhs: Long): BigInt
inline operator fun BigInt.plus(rhs: UByte): BigInt
inline operator fun BigInt.plus(rhs: UShort): BigInt
inline operator fun BigInt.plus(rhs: UInt): BigInt
inline operator fun BigInt.plus(rhs: ULong): BigInt
Link copied to clipboard
inline operator fun BigInt.rem(rhs: Byte): BigInt
inline operator fun BigInt.rem(rhs: Short): BigInt
inline operator fun BigInt.rem(rhs: Int): BigInt
inline operator fun BigInt.rem(rhs: Long): BigInt
inline operator fun BigInt.rem(rhs: UByte): BigInt
inline operator fun BigInt.rem(rhs: UShort): BigInt
inline operator fun BigInt.rem(rhs: UInt): BigInt
inline operator fun BigInt.rem(rhs: ULong): BigInt
Link copied to clipboard
inline operator fun BigInt.times(rhs: Byte): BigInt
inline operator fun BigInt.times(rhs: Short): BigInt
inline operator fun BigInt.times(rhs: Int): BigInt
inline operator fun BigInt.times(rhs: Long): BigInt
inline operator fun BigInt.times(rhs: UByte): BigInt
inline operator fun BigInt.times(rhs: UShort): BigInt
inline operator fun BigInt.times(rhs: UInt): BigInt
inline operator fun BigInt.times(rhs: ULong): BigInt
Link copied to clipboard
infix inline fun BigInt.xor(rhs: Byte): BigInt
infix inline fun BigInt.xor(rhs: Short): BigInt
infix inline fun BigInt.xor(rhs: Int): BigInt
infix inline fun BigInt.xor(rhs: Long): BigInt
infix inline fun BigInt.xor(rhs: UByte): BigInt
infix inline fun BigInt.xor(rhs: UShort): BigInt
infix inline fun BigInt.xor(rhs: UInt): BigInt
infix inline fun BigInt.xor(rhs: ULong): BigInt