BigInteger Structure

# BigInteger Structure

Solver Foundation 3.0

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Represents an arbitrarily large signed integer.

Namespace:  Microsoft.SolverFoundation.Common
Assembly:  Microsoft.Solver.Foundation (in Microsoft.Solver.Foundation.dll)

## Syntax

```[CLSCompliantAttribute(true)]
public struct BigInteger : IComparable,
IComparable<BigInteger>, IEquatable<BigInteger>, IComparable<int>,
IEquatable<int>, IComparable<uint>, IEquatable<uint>, IComparable<long>,
IEquatable<long>, IComparable<ulong>, IEquatable<ulong>, IComparable<double>,
IEquatable<double>
```

The BigInteger type exposes the following members.

## Properties

NameDescription
AbsoluteValueGets the absolute value.
BitCountGets the count of the number of bits in an integer.
IsEvenGets a value indicating whether a value is exactly divisible by two.
IsOneGets a value indicating whether a value is equal to one.
IsPowerOfTwoGets a value indicating whether a value is a power of two (2x).
IsZeroGets a value indicating whether a value is equal to zero.
SignGets a value that represents the sign of a value.
Top

## Methods

NameDescription
CompareFractionsCompares integer fractions.
CompareFractionToBigIntegerCompares a fraction with a big integer.
CompareFractionToLongCompares a fraction to a long.
CompareFractionToUlongCompares a fraction to an unsigned long.
CompareTo(Double)Compares a big integer to a double.
CompareTo(Int32)Compares a big integer to a 32-bit integer.
CompareTo(Int64)Compares a big integer to a long.
CompareTo(Object)Compares a big integer to a value.
CompareTo(UInt32)Compares a big integer to an unsigned integer.
CompareTo(UInt64)Compares a big integer to an unsigned long.
CompareTo(BigInteger)Compares two BigInteger values.
DivModDivides two big integers and saves the quotient and remainder.
DivModOneDivides two big integers.
Equals(Double)Returns a value that indicates whether a big integer is equal to a double.
Equals(Int32)Returns a value that indicates whether a big integer is equal to an integer.
Equals(Int64)Returns a value that indicates whether a big integer is equal to a long integer.
Equals(Object)Returns a value that indicates whether a big integer is equal to an object. (Overrides ValueType.Equals(Object).)
Equals(UInt32)Returns a value that indicates whether a big integer is equal to an integer.
Equals(UInt64)Returns a value that indicates whether a big integer is equal to a long integer.
Equals(BigInteger)Determines if two big integers are equal.
FactorialComputes the factorial of a big integer.
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
GcdComputes the greatest common divisor.
GetHashCodeComputes the hash of a value. (Overrides ValueType.GetHashCode().)
GetTypeGets the Type of the current instance. (Inherited from Object.)
MemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
NegateNegates the sign of a big integer.
Power(BigInteger, BigInteger)Raises a big integer to the power of a big integer.
Power(BigInteger, BigInteger, BigInteger)Raises a big integer to the power of a big integer, and stores the result.
Power(BigInteger, BigInteger, Rational)Raises a big integer to the power of a big integer, and stores the result.
TestBitReturns a value that indicates whether a test bit is set.
ToHexStringConverts the numeric value of the current big integer to its equivalent string representation of hex characters.
ToStringConverts the numeric value of the current big integer to its equivalent string representation. (Overrides ValueType.ToString().)
TryFactorialComputes the factorial of a big integer. A return value indicates whether the computation succeeded.
Top

## Operators

NameDescription
BitwiseAndPerforms a bitwise AND operation on two big integers.
BitwiseOrPerforms the bitwise OR operation on two big integers.
DecrementSubtracts one from a big integer.
DivisionDivides two big integers.
Equality(Double, BigInteger)Returns a value that indicates whether a double is equal to a big integer.
Equality(Int32, BigInteger)Returns a value that indicates whether an integer is equal to a big integer.
Equality(Int64, BigInteger)Returns a value that indicates whether a long is equal to a big integer.
Equality(UInt32, BigInteger)Returns a value that indicates whether an unsigned integer is equal to a big integer.
Equality(UInt64, BigInteger)Returns a value that indicates whether an unsigned long is equal to a big integer.
Equality(BigInteger, BigInteger)Returns a value that indicates whether two big integers are equal.
Equality(BigInteger, Double)Returns a value that indicates whether a big integer is equal to a double.
Equality(BigInteger, Int32)Returns a value that indicates whether a big integer is equal to an integer.
Equality(BigInteger, Int64)Returns a value that indicates whether a big integer is equal to a long.
Equality(BigInteger, UInt32)Returns a value that indicates whether a big integer is equal to an unsigned integer.
Equality(BigInteger, UInt64)Returns a value that indicates whether a big integer is equal to an unsigned long.
ExclusiveOrComputes the bitwise exclusive OR on two big integers.
Explicit(Double to BigInteger)Converts a double to a big integer.
Explicit(BigInteger to Int64)Converts a big integer to a long.
Explicit(BigInteger to Int32)Converts a big integer to an integer.
Explicit(BigInteger to UInt32)Converts a big integer to an integer.
Explicit(BigInteger to Double)Converts a big integer to a double.
Explicit(BigInteger to UInt64)Converts a big integer to an unsigned long.
GreaterThan(Double, BigInteger)Returns a value that indicates whether a big integer is greater than a double.
GreaterThan(Int32, BigInteger)Returns a value that indicates whether a big integer is greater than an integer.
GreaterThan(Int64, BigInteger)Returns a value that indicates whether a big integer is greater than a long.
GreaterThan(UInt32, BigInteger)Returns a value that indicates whether a big integer is greater than an unsigned integer.
GreaterThan(UInt64, BigInteger)Returns a value that indicates whether a big integer is greater than an unsigned long.
GreaterThan(BigInteger, BigInteger)Returns a value that indicates whether a big integer is greater than another big integer.
GreaterThan(BigInteger, Double)Returns a value that indicates whether a big integer is greater than a double.
GreaterThan(BigInteger, Int32)Returns a value that indicates whether a big integer is greater than an integer.
GreaterThan(BigInteger, Int64)Returns a value that indicates whether a big integer is larger than a long.
GreaterThan(BigInteger, UInt32)Returns a value that indicates whether a big integer is greater than an unsigned integer.
GreaterThan(BigInteger, UInt64)Returns a value that indicates whether a big integer is greater than an unsigned long.
GreaterThanOrEqual(Double, BigInteger)Returns a value that indicates whether a big integer is greater than or equal to a double.
GreaterThanOrEqual(Int32, BigInteger)Returns a value that indicates whether a big integer is greater than or equal to an integer.
GreaterThanOrEqual(Int64, BigInteger)Returns a value that indicates whether a big integer is greater than or equal to a long.
GreaterThanOrEqual(UInt32, BigInteger)Returns a value that indicates whether a big integer is greater than or equal to an unsigned integer.
GreaterThanOrEqual(UInt64, BigInteger)Returns a value that indicates whether a big integer is greater than or equal to an unsigned long.
GreaterThanOrEqual(BigInteger, BigInteger)Returns a value that indicates whether a big integer is greater than or equal to a big integer.
GreaterThanOrEqual(BigInteger, Double)Returns a value that indicates whether a big integer is greater than or equal to a double.
GreaterThanOrEqual(BigInteger, Int32)Returns a value that indicates whether a big integer is greater than or equal to an integer.
GreaterThanOrEqual(BigInteger, Int64)Returns a value that indicates whether a big integer is greater than or equal to a long.
GreaterThanOrEqual(BigInteger, UInt32)Returns a value that indicates whether a big integer is greater than or equal to an unsigned integer.
GreaterThanOrEqual(BigInteger, UInt64)Returns a value that indicates whether a big integer is greater than or equal to an unsigned long.
Implicit(Int32 to BigInteger)Converts an integer to a big integer.
Implicit(Int64 to BigInteger)Converts a long to a big integer.
Implicit(UInt32 to BigInteger)Converts an unsigned integer to a big integer.
Implicit(UInt64 to BigInteger)Converts an unsigned long to a big integer.
IncrementIncrements a big integer by one.
Inequality(Double, BigInteger)Returns a value that indicates whether a double is not equal to a big integer.
Inequality(Int32, BigInteger)Returns a value that indicates whether an integer is not equal to a big integer.
Inequality(Int64, BigInteger)Returns a value that indicates whether a long is not equal to a big integer.
Inequality(UInt32, BigInteger)Returns a value that indicates whether an unsigned integer is not equal to a big integer.
Inequality(UInt64, BigInteger)Returns a value that indicates whether an unsigned long is not equal to a big integer.
Inequality(BigInteger, BigInteger)Returns a value that indicates whether two big integers are not equal.
Inequality(BigInteger, Double)Returns a value that indicates whether a big integer is not equal to a double.
Inequality(BigInteger, Int32)Returns a value that indicates whether a big integer is not equal to an integer.
Inequality(BigInteger, Int64)Returns a value that indicates whether a big integer is not equal to a long.
Inequality(BigInteger, UInt32)Returns a value that indicates whether a big integer is not equal to an unsigned integer.
Inequality(BigInteger, UInt64)Returns a value that indicates whether a big integer is not equal to an unsigned long.
LeftShiftShifts a big integer a specified number of bits to the left.
LessThan(Double, BigInteger)Returns a value that indicates whether a big integer is less than a double.
LessThan(Int32, BigInteger)Returns a value that indicates whether a big integer is less than an integer.
LessThan(Int64, BigInteger)Returns a value that indicates whether a big integer is less than a long.
LessThan(UInt32, BigInteger)Returns a value that indicates whether a big integer is less than an unsigned integer.
LessThan(UInt64, BigInteger)Returns a value that indicates whether a big integer is less than an unsigned long.
LessThan(BigInteger, BigInteger)Returns a value that indicates whether a big integer is less than a second big integer.
LessThan(BigInteger, Double)Returns a value that indicates whether a big integer is less than a double.
LessThan(BigInteger, Int32)Returns a value that indicates whether a big integer is less than an integer.
LessThan(BigInteger, Int64)Returns a value that indicates whether a big integer is less than an integer.
LessThan(BigInteger, UInt32)Returns a value that indicates whether a big integer is less than an unsigned integer.
LessThan(BigInteger, UInt64)Returns a value that indicates whether a big integer is less than an unsigned long.
LessThanOrEqual(Double, BigInteger)Returns a value that indicates whether a big integer is less than or equal to a double.
LessThanOrEqual(Int32, BigInteger)Returns a value that indicates whether a big integer is less than or equal to an integer.
LessThanOrEqual(Int64, BigInteger)Returns a value that indicates whether a big integer is less than or equal to a long.
LessThanOrEqual(UInt32, BigInteger)Returns a value that indicates whether a big integer is less than or equal to an unsigned integer.
LessThanOrEqual(UInt64, BigInteger)Returns a value that indicates whether a big integer is less than or equal to an unsigned long.
LessThanOrEqual(BigInteger, BigInteger)Returns a value that indicates whether a big integer is less than or equal to another big integer.
LessThanOrEqual(BigInteger, Double)Returns a value that indicates whether a big integer is less than or equal to a double.
LessThanOrEqual(BigInteger, Int32)Returns a value that indicates whether a big integer is less than or equal to an integer.
LessThanOrEqual(BigInteger, Int64)Returns a value that indicates whether a big integer is less than or equal to a long.
LessThanOrEqual(BigInteger, UInt32)Returns a value that indicates whether a big integer is less than or equal to an unsigned integer.
LessThanOrEqual(BigInteger, UInt64)Returns a value that indicates whether a big integer is less than or equal to an unsigned long.
ModulusReturns the remainder that results from division with two specified BigInteger values.
MultiplyReturns the product of two big integers.
OnesComplementReturns the bitwise one's complement of a big integer.
RightShiftShifts a big integer a specified number of bits to the right.
SubtractionSubtracts a big integer from another big integer.
UnaryNegationNegates a specified big integer.
UnaryPlusReturns the value of a big integer.
Top