BigRational Methods

Methods

Abs Returns the absolute value of a rational number.
Add Adds two rational numbers.
Approximate Approximates the rational number by another rational number whose denominator does not exceed the given value.
Ceiling Rounds a rational number up to the nearest integer.
CompareTo(BigInteger) Compares this instance to a specified rational number and returns an indication of their relative values.
CompareTo(BigRational) Compares this instance to a specified rational number and returns an indication of their relative values.
CompareTo(Int32) Compares this instance to a specified rational number and returns an indication of their relative values.
Deconstruct Deconstructs a rational number into its numerator and denominator.
Divide Divides a rational number by another and returns the result.
Equals(BigRational) Returns whether two rational numbers represent the same value.
Equals(Object) Returns whether this instance is equal to a specified object.
(Overrides ValueType.Equals(Object))
Floor Rounds a rational number down to the nearest integer.
GetHashCode Returns the hash code for this instance.
(Overrides ValueType.GetHashCode())
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsNegativeDetermines whether a value is negative.
IsPositiveDetermines whether a value is positive or zero.
Max Returns the largest of two rational numbers.
MaxMagnitudeReturns the value with the greater magnitude.
Min Returns the smallest of two rational numbers.
MinMagnitudeReturns the value with the lesser magnitude.
Multiply(BigInteger, BigRational) Multiplies a rational number by an arbitrary precision integer.
Multiply(BigRational, BigInteger) Multiplies a rational number by an arbitrary precision integer.
Multiply(BigRational, BigRational) Multiplies two rational numbers.
Multiply(BigRational, Int32) Multiplies a rational number by an integer.
Multiply(Int32, BigRational) Multiplies a rational number by an integer.
Negate Negates a rational number from another and returns the result.
Parse(ReadOnlySpan<Char>, IFormatProvider)Converts a span of characters to a BigRational using the specified format provider.
Parse(String, IFormatProvider)Converts a string to a BigRational using the specified format provider.
Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)Converts a span of characters to a BigRational using the specified style and format provider.
Parse(String, NumberStyles, IFormatProvider)Converts a string to a BigRational using the specified style and format provider.
Pow Raises a BigRational to an integer power.
Rationalize(Double) Returns the rational number that exactly equals a floating-point real number.
Rationalize(Double, BigInteger) Approximates a real number by a rational number whose numerator and denominator do not exceed the given value.
Reciprocal Returns the reciprocal (inverse) of a rational number..
Round(BigRational) Rounds a rational number to the nearest integer.
Round(BigRational, Int32) Rounds a rational number to the specified number of decimal digits.
ScaleByPowerOfTwo Multiplies a BigRational value by a power of two.
Subtract Subtracts a rational number from another and returns the result.
ToString() Returns a string representation of the rational number.
(Overrides ValueType.ToString())
ToString(String, IFormatProvider) Returns a string representation of a rational number.
Truncate Rounds a rational number towards zero.
TryFormatTries to format this value into a span of characters.
TryParse(ReadOnlySpan<Char>, IFormatProvider, BigRational)Tries to convert a span of characters to a BigRational using the specified format provider.
TryParse(String, IFormatProvider, BigRational)Tries to convert a string to a BigRational using the specified format provider.
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, BigRational)Tries to convert a span of characters to a BigRational using the specified style and format provider.
TryParse(String, NumberStyles, IFormatProvider, BigRational)Tries to convert a string to a BigRational using the specified style and format provider.

See Also