ObjBigIntExt extension

on

Properties

bitLength int

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Returns the minimum number of bits required to store this big integer.
no setter
isEven bool

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Whether this big integer is even.
no setter
isNegative bool

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Whether this number is negative.
no setter
isOdd bool

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Whether this big integer is odd.
no setter
isValidInt bool

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Whether this big integer can be represented as an int without losing precision.
no setter
sign int

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Returns the sign of this big integer.
no setter

Methods

abs() BigInt

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Returns the absolute value of this integer.
compareTo(BigInt other) int

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Compares this to other.
gcd(BigInt other) BigInt

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Returns the greatest common divisor of this big integer and other.
modInverse(BigInt modulus) BigInt

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Returns the modular multiplicative inverse of this big integer modulo modulus.
modPow(BigInt exponent, BigInt modulus) BigInt

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Returns this integer to the power of exponent modulo modulus.
pow(int exponent) BigInt

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Returns this to the power of exponent.
remainder(BigInt other) BigInt

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Returns the remainder of the truncating division of this by other.
toDouble() double

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Returns this BigInt as a double.
toInt() int

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Returns this BigInt as an int.
toRadixString(int radix) String

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Converts this to a string representation in the given radix.
toSigned(int width) BigInt

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Returns the least significant width bits of this integer, extending the highest retained bit to the sign. This is the same as truncating the value to fit in width bits using an signed 2-s complement representation. The returned value has the same bit value in all positions higher than width.
toUnsigned(int width) BigInt

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Returns the least significant width bits of this big integer as a non-negative number (i.e. unsigned representation). The returned value has zeros in all bit positions higher than width.

Operators

operator %(Obj<BigInt> other) Obj<BigInt>

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Euclidean modulo operator.
operator &(Obj<BigInt> other) Obj<BigInt>

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Bit-wise and operator.
operator *(Obj<BigInt> other) Obj<BigInt>

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Multiplies other by this big integer.
operator +(Obj<BigInt> other) Obj<BigInt>

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Adds other to this big integer.
operator -(Obj<BigInt> other) Obj<BigInt>

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Subtracts other from this big integer.
operator /(Obj<BigInt> other) Obj<double>

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Double division operator.
operator <(Obj<BigInt> other) bool

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Whether this big integer is numerically smaller than other.
operator <<(Obj<int> shiftAmount) Obj<BigInt>

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Shift the bits of this integer to the left by shiftAmount.
operator <=(Obj<BigInt> other) bool

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Whether other is numerically greater than this big integer.
operator >(Obj<BigInt> other) bool

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Whether this big integer is numerically greater than other.
operator >=(Obj<BigInt> other) bool

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Whether other is numerically smaller than this big integer.
operator >>(Obj<int> shiftAmount) Obj<BigInt>

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Shift the bits of this integer to the right by shiftAmount.
operator ^(Obj<BigInt> other) Obj<BigInt>

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Bit-wise exclusive-or operator.
operator unary-() Obj<BigInt>

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Return the negative value of this integer.
operator |(Obj<BigInt> other) Obj<BigInt>

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Bit-wise or operator.
operator ~() Obj<BigInt>

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

The bit-wise negate operator.
operator ~/(Obj<BigInt> other) Obj<BigInt>

Available on Obj<BigInt>, provided by the ObjBigIntExt extension

Truncating integer division operator.