Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Struct: RT.BigInteger.BigInt

Summary

Encapsulates an arbitrary-size integer.

Constructors

BigInt(int value)
Constructs a BigInt from a 32-bit signed integer.
BigInt(ulong value)
Constructs a BigInt from a 64-bit unsigned integer.
BigInt(long value)
Constructs a BigInt from a 64-bit signed integer.

Instance methods

BigInt
Add(BigInt other)
Returns the sum of this integer plus other.
intCompares this integer to other.
BigInt
Divide(BigInt other)
Returns the quotient obtained by dividing this integer by other.
QuotientRemainderCalculates a quotient and remainder by dividing this integer by other.
bool
Equals(BigInt other)
Equality comparison.
bool
Equals(object obj)
  • Overrides: object.Equals(object)
bool
GetBit(int index)
Returns whether the bit at index is 1 (regardless of the integer’s sign).
int
  • Overrides: object.GetHashCode()
Hash code function.
BigInt
ModPow(BigInt exponent, BigInt modulus)
Raises the current integer to the power of exponent and returns the result modulo modulus. (see also remarks)
BigInt
Modulo(BigInt other)
Returns the remainder obtained when dividing this integer by other.
BigIntReturns the product of this integer times other.
BigInt
Pow(BigInt exponent)
Raises the current integer to the power of exponent and returns the result.
BigIntReturns the floor (integer portion) of the square root of the current value.
string
  • Overrides: object.ToString()
Override; see base.

Static methods

BigInt
Parse(string str)
Parses a numerical string (consisting only of digits 0 to 9, optionally prepended with a -) into a BigInt.
bool
TryParse(string str, out BigInt value)

Operators

BigIntReturns the sum of one plus two.
BigIntBitwise and operator.
BigIntBitwise or operator.
BigIntDecrement operator.
BigIntReturns the quotient obtained by dividing one by two.
boolEquality comparison operator.
BigIntBitwise xor operator.
boolGreater-than comparison operator.
boolGreater-than-or-equal-to comparison operator.
BigIntConstructs a BigInt from a 64-bit signed integer.
BigIntConstructs a BigInt from a 64-bit unsigned integer.
BigIntConstructs a BigInt from a 32-bit signed integer.
BigIntConstructs a BigInt from a 32-bit unsigned integer.
BigIntConstructs a BigInt from a 16-bit signed integer.
BigIntConstructs a BigInt from a 16-bit unsigned integer.
BigIntConstructs a BigInt from an 8-bit signed integer.
BigIntConstructs a BigInt from an 8-bit unsigned integer.
BigIntIncrement operator.
boolInequality comparison operator.
BigInt
operator<<(BigInt operand, int amount)
Returns the result of a bit-shift-left by the specified amount. This is equivalent to multiply by 2 to the power of amount. (see also remarks)
boolLess-than comparison operator.
boolLess-than-or-equal-to comparison operator.
BigIntReturns the remainder obtained when dividing one by two.
BigIntReturns the product of one times two.
BigIntReturns the bitwise inverse (bitwise NOT).
BigInt
operator>>(BigInt operand, int amount)
Returns the result of a bit-shift-right by the specified amount. This is equivalent to dividing by 2 to the power of amount and rounding down. (see also remarks)
BigIntReturns the difference of one minus two.
BigIntReturns the negative value.
BigInt
operator+(BigInt operand)
Returns the operand.

Instance properties

BigIntReturns the absolute value.
BigIntReturns the bitwise inverse (bitwise NOT).
boolDetermines whether the integer is 0.
int Returns the bit-index of the most significant bit in this number. If the number is positive, this is the index of the most significant ‘1’ bit. If the number is negative, it is the index of the most significant ‘0’ bit. If the number is zero, the result is -1.
BigIntReturns the negative value.
intReturns the sign of the number: −1 for negative numbers, 0 for zero, and 1 for positive numbers.