BigFloat.CompareTo Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3

Overload List

CompareTo(BigFloat) Compares a number to another number.
CompareTo(BigFloat, AccuracyGoal) Compares a number to another number up to the specified AccuracyGoal.

CompareTo(BigFloat)

Compares a number to another number.
C#
public int CompareTo(
	BigFloat? other
)

Parameters

other  BigFloat
A BigFloat value.

Return Value

Int32
-1 if this number is less than other; +1 if this number is larger than other; 0 if this number equals other.

Implements

IComparable<T>.CompareTo(T)

CompareTo(BigFloat, AccuracyGoal)

Compares a number to another number up to the specified AccuracyGoal.
C#
public int CompareTo(
	BigFloat other,
	AccuracyGoal goal
)

Parameters

other  BigFloat
A BigFloat value.
goal  AccuracyGoal
The threshold for equality.

Return Value

Int32
-1 if this number is less than other; +1 if this number is larger than other; 0 if this number equals other.

Remarks

Numbers are compared up to the precision specified by goal. If numbers are the same up to this precision, they are considered equal.

See Also