KBigInteger

interface KBigInteger

Interface for arbitrary-precision integer arithmetic. Provides operations for mathematical calculations with integers of unlimited size.

Inheritors

Functions

Link copied to clipboard
abstract fun abs(): KBigInteger

Returns the absolute value of this KBigInteger.

Link copied to clipboard
abstract fun add(other: KBigInteger): KBigInteger

Returns a KBigInteger that is the sum of this and the specified value.

Link copied to clipboard
abstract operator fun compareTo(other: KBigInteger): Int

Compares this KBigInteger with the specified KBigInteger.

Link copied to clipboard
operator fun KBigInteger.div(other: KBigInteger): KBigInteger

Division operator for KBigInteger.

Link copied to clipboard
abstract fun divide(other: KBigInteger): KBigInteger

Returns a KBigInteger that is the quotient of this divided by the specified value.

Link copied to clipboard
open fun isNegative(): Boolean

Checks if this KBigInteger is negative (less than zero).

Link copied to clipboard
open fun isPositive(): Boolean

Checks if this KBigInteger is positive (greater than zero).

Link copied to clipboard
open fun isZero(): Boolean

Checks if this KBigInteger is equal to zero.

Link copied to clipboard

Returns the maximum of this KBigInteger and the specified value.

Link copied to clipboard

Returns the minimum of this KBigInteger and the specified value.

Link copied to clipboard

Subtraction operator for KBigInteger.

Link copied to clipboard
abstract fun mod(other: KBigInteger): KBigInteger

Returns a KBigInteger that is the remainder of this divided by the specified value.

Link copied to clipboard
abstract fun multiply(other: KBigInteger): KBigInteger

Returns a KBigInteger that is the product of this and the specified value.

Link copied to clipboard
open fun negate(): KBigInteger

Returns the negation of this KBigInteger.

Link copied to clipboard
operator fun KBigInteger.plus(other: KBigInteger): KBigInteger

Addition operator for KBigInteger.

Link copied to clipboard
fun KBigInteger.pow(exponent: Int): KBigInteger

Calculates this KBigInteger raised to the power of the specified integer exponent.

Link copied to clipboard
operator fun KBigInteger.rem(other: KBigInteger): KBigInteger

Remainder operator for KBigInteger.

Link copied to clipboard
abstract fun signum(): Int

Returns the signum function of this KBigInteger.

Link copied to clipboard
abstract fun subtract(other: KBigInteger): KBigInteger

Returns a KBigInteger that is the difference of this and the specified value.

Link copied to clipboard

Multiplication operator for KBigInteger.

Link copied to clipboard
abstract fun toLong(): Long

Converts this KBigInteger to a Long value.

Link copied to clipboard

Converts this KBigInteger to a KBigDecimal for precise decimal operations.

Link copied to clipboard
abstract override fun toString(): String

Returns the string representation of this KBigInteger.

Link copied to clipboard

Unary minus operator for KBigInteger.

Link copied to clipboard

Unary plus operator for KBigInteger (identity operation).