Arbitrary precision floating point numbers for exact numeric computations for when performance is not an issue.
More...
Inherits IFormattable, IComparable, IComparable< BigFloat >, and IEquatable< BigFloat >.
|
|
BigInteger | Numerator |
| | The numerator as an arbitrarily sized integer.
|
| |
|
BigInteger | Denominator |
| | The denominator as an arbitrarily sized integer.
|
| |
|
|
static readonly BigFloat | One = new BigFloat(BigInteger.One, BigInteger.One) |
| | Big float 1.
|
| |
|
static readonly BigFloat | Zero = new BigFloat(BigInteger.Zero, BigInteger.One) |
| | Big float 0.
|
| |
|
static readonly BigFloat | Infinity = new BigFloat(BigInteger.One, BigInteger.Zero) |
| | Big float Infinity.
|
| |
|
static readonly BigFloat | NegativeInfinity = new BigFloat(BigInteger.MinusOne, BigInteger.Zero) |
| | Big float negative infinity.
|
| |
|
static readonly BigFloat | NaN = new BigFloat(BigInteger.Zero, BigInteger.Zero) |
| | Big float not a number.
|
| |
Arbitrary precision floating point numbers for exact numeric computations for when performance is not an issue.
◆ BigFloat() [1/2]
| OpenTap.BigFloat.BigFloat |
( |
BigInteger |
nominator, |
|
|
BigInteger |
denominator |
|
) |
| |
|
inline |
Creates a new BigFloat from fractional values.
- Parameters
-
◆ BigFloat() [2/2]
| OpenTap.BigFloat.BigFloat |
( |
double |
value | ) |
|
|
inline |
◆ CompareTo() [1/2]
| int OpenTap.BigFloat.CompareTo |
( |
BigFloat |
other | ) |
|
|
inline |
Compares two numbers.
- Parameters
-
- Returns
- -1 if other is less, 1 if other is greater and 0 if other is equal to this.
◆ CompareTo() [2/2]
| int OpenTap.BigFloat.CompareTo |
( |
object |
obj | ) |
|
|
inline |
Converts obj before doing comparison using CompareTo. Throws an exception if obj cannot be compared to a BigFloat.
- Parameters
-
- Returns
◆ Equals() [1/2]
| bool OpenTap.BigFloat.Equals |
( |
BigFloat |
other | ) |
|
|
inline |
Compares two numbers.
- Parameters
-
- Returns
- True if they are equal.
◆ Equals() [2/2]
| override bool OpenTap.BigFloat.Equals |
( |
object |
obj | ) |
|
|
inline |
Compares this bigfloat with another object.
- Parameters
-
- Returns
◆ GetHashCode()
| override int OpenTap.BigFloat.GetHashCode |
( |
| ) |
|
|
inline |
Gets the hash code of this value.
- Returns
◆ Normalize()
Normalizes the fraction by dividing by greates common divisor.
- Returns
- The normalized fraction.
◆ ToString() [1/2]
| override string OpenTap.BigFloat.ToString |
( |
| ) |
|
|
inline |
Converts the fraction to a decimal string.
- Returns
◆ ToString() [2/2]
| string OpenTap.BigFloat.ToString |
( |
string |
format, |
|
|
IFormatProvider |
formatProvider |
|
) |
| |
|
inline |
Converts this value to a string.
- Parameters
-
- Returns