BigInteger Methods

Methods

Abs Returns the absolute value of a number.
Add Returns the sum of two BigInteger numbers.
BinomialCoefficients Enumerates over the binomial coefficients of a specified degree.
ClampConstrains a value to the inclusive range defined by a minimum and maximum.
Compare Compares two numbers.
CompareTo(BigInteger) Compares a number to another number.
CompareTo(Int32) Compares a number to another number.
CompareTo(Int64) Compares a number to another number.
CopySignReturns a value with the magnitude of one value and the sign of another.
Divide Divides one BigInteger by another and returns the result.
DivRem(BigInteger, BigInteger)Computes the quotient and remainder of two values.
DivRem(BigInteger, BigInteger, BigInteger) Computes the quotient and remainder of two BigInteger numbers.
Equals(BigInteger) Tests whether a number equals another number.
Equals(Int32) Tests whether a number equals another number.
Equals(Object) Returns whether this instance is equal to a specified object.
(Overrides ValueType.Equals(Object))
ExtendedGreatestCommonDivisor Returns the greatest common divisor (GCD) of two BigInteger numbers.
Factorial Gets the factorial of a number.
Factorial2 Gets the double factorial of a number.
GetHashCode Returns the hash code for this instance.
(Overrides ValueType.GetHashCode())
GetTypeGets the Type of the current instance.
(Inherited from Object)
GreatestCommonDivisor Returns the greatest common divisor (GCD) of two BigInteger numbers.
IsBitSet Returns whether the bit at the specified position is set to 1.
IsNegativeDetermines if a value represents a negative real number.
IsPositiveDetermines if a value represents zero or a positive real number.
IsPseudoPrime Uses the Rabin-Miller test to determine if a number is pseudo-prime.
LeastCommonMultiple Returns the least common multiple (LCM) of two BigInteger numbers.
LeftShift Shifts the bits to the left, padding the right with zeros.
Log2Computes the integer base-2 logarithm of a value.
Max Returns the largest of two numbers.
MaxMagnitudeCompares two values to compute which has the greater magnitude.
Min Returns the smallest of two numbers.
MinMagnitudeCompares two values to compute which has the lesser magnitude.
Mod Returns the remainder after dividing one BigInteger by another and returns the result.
ModularInverse Computes the modular inverse of an integer with respect to the specified modulus.
ModularPow(BigInteger, BigInteger, BigInteger) Raises a number to a power modulo another number.
ModularPow(BigInteger, Int32, BigInteger) Raises a number to a power modulo another number.
Modulus Returns the remainder after dividing one BigInteger by another and returns the result.
Multiply(BigInteger, BigInteger) Returns the product of two BigInteger numbers.
Multiply(BigInteger, Int32) Returns the product of a BigInteger number and an integer.
Multiply(BigInteger, UInt32) Returns the product of a BigInteger number and an unsigned integer.
Multiply(Int32, BigInteger) Returns the product of an integer and a BigInteger number.
Multiply(UInt32, BigInteger) Returns the product of an unsigned integer and a BigInteger number.
Negate Returns a BigInteger with the opposite sign.
Parse(String) Converts the string representation of a number to its BigInteger equivalent.
Parse(ReadOnlySpan<Char>, IFormatProvider)Converts a span of characters to a BigInteger using the specified format provider.
Parse(String, NumberStyles) Converts the string representation of a number in a specified style to its BigInteger equivalent.
Parse(String, IFormatProvider) Converts the string representation of a number in a specified culture-specific format to its BigInteger equivalent.
Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)Converts a span of characters to a BigInteger using the specified style and format provider.
Parse(String, NumberStyles, IFormatProvider) Converts the string representation of a number in a specified style and culture-specific format to its BigInteger equivalent.
Pow(BigInteger, Int32) Raises a number to the specified power and returns the result as a BigInteger number.
Pow(Int32, Int32) Raises a number to the specified power and returns the result as a BigInteger number.
Random(IRandomSource, Int32) Returns a random BigInteger number with the specified number of bits.
Random(Random, Int32) Returns a random BigInteger number with the specified number of bits.
RightShift(BigInteger, Int32) Shifts the bits to the right, discarding bits on the right.
RightShift(BigInteger, Int32, RoundingMode) Shifts the bits to the right with rounding.
Sqrt Computes the integer square root of a number.
Square Returns the square of a BigInteger number.
Subtract Returns the difference between two BigInteger numbers.
ToByteArray Converts a BigInteger value to a byte array.
ToString() Returns a string representation of the number.
(Overrides ValueType.ToString())
ToString(String) Formats the value of the current instance using the specified format.
ToString(String, IFormatProvider) Formats the value of the current instance using the specified format.
ToUInt32Array Converts a BigInteger value to an array of UInt32 words.
TryFormatTries to format this value into a span of characters.
TryParse(String, BigInteger) Converts the string representation of a number to its BigInteger equivalent. A return value indicates whether the conversion succeeded or failed.
TryParse(ReadOnlySpan<Char>, IFormatProvider, BigInteger)Tries to convert a span of characters to a BigInteger using the specified format provider.
TryParse(String, IFormatProvider, BigInteger)Tries to convert a string to a BigInteger using the specified format provider.
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, BigInteger)Tries to convert a span of characters to a BigInteger using the specified style and format provider.
TryParse(String, NumberStyles, IFormatProvider, BigInteger) Converts the string representation of a number in a specified style and culture-specific format to its BigInteger equivalent. A return value indicates whether the conversion succeeded or failed.
Xor Computes the bitwise exclusive or of two BigInteger values.

See Also