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.
ClampClamps a value to an inclusive minimum and maximum value.
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.
CopySignCopies the sign of a value to the sign of another value.
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 
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 log2 of a value.
Max Returns the largest of two numbers.
MaxMagnitudeCompares two values to compute which is greater.
Min Returns the smallest of two numbers.
MinMagnitudeCompares two values to compute which is lesser.
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)Parses a span of characters into a value.
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)Parses a span of characters into a value.
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 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.
TryFormatTries to format the value of the current instance into the provided 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 parse a span of characters into a value.
TryParse(String, IFormatProvider, BigInteger)Tries to parse a string into a value.
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, BigInteger)Tries to parse a span of characters into a value.
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