BigRational Methods |
[This is preliminary documentation and is subject to change.]
The BigRational type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() |
Abs |
Get the absolute value of the specified r.
|
![]() ![]() |
Add |
Adds the specified x and y.
|
![]() ![]() |
Compare |
Compares the specified r1.
|
![]() |
CompareTo |
Compares the current object with another object of the same type.
|
![]() ![]() |
Divide |
Divides the specified dividend.
|
![]() ![]() |
DivRem |
Get the remainder of the division.
|
![]() |
Equals(Object) |
Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object).) |
![]() |
Equals(BigRational) |
Indicates whether the current object is equal to another object of the same type.
a/b = c/d, iff ad = bc
|
![]() |
GetFractionPart |
GetWholePart() and GetFractionPart() BigRational == Whole, Fraction 0/2 == 0, 0/2 1/2 == 0, 1/2 -1/2 == 0, -1/2 1/1 == 1, 0/1 -1/1 == -1, 0/1 -3/2 == -1, -1/2 3/2 == 1, 1/2 |
![]() |
GetHashCode |
Returns a hash code for this instance.
(Overrides ValueTypeGetHashCode.) |
![]() |
GetType |
Gets the Type of the current instance. (Inherited from Object.) |
![]() |
GetWholePart |
GetWholePart() and GetFractionPart() BigRational == Whole, Fraction 0/2 == 0, 0/2 1/2 == 0, 1/2 -1/2 == 0, -1/2 1/1 == 1, 0/1 -1/1 == -1, 0/1 -3/2 == -1, -1/2 3/2 == 1, 1/2 |
![]() ![]() |
Invert |
Inverts the specified r.
|
![]() ![]() |
LeastCommonDenominator |
Least Common Denominator (LCD)
The LCD is the least common multiple of the two denominators. For instance, the LCD of
{1/2, 1/4} is 4 because the least common multiple of 2 and 4 is 4. Likewise, the LCD
of {1/2, 1/3} is 6.
To find the LCD:
1) Find the Greatest Common Divisor (GCD) of the denominators
2) Multiply the denominators together
3) Divide the product of the denominators by the GCD
|
![]() ![]() |
Multiply |
Multiplies the specified x and y.
|
![]() ![]() |
Negate |
Negates the specified r.
|
![]() ![]() |
Pow |
Gets the powers the specified base value.
|
![]() ![]() |
Remainder |
Calculates the remainder.
|
![]() ![]() |
Subtract |
Subtracts y from the specified x.
|
![]() |
ToString |
Returns the fully qualified type name of this instance.
(Overrides ValueTypeToString.) |
![]() ![]() |
TryParse |
Tries to parse.
|