Return
bool
true if the two values differ by no more than 10 * 2^(-52); false otherwise.
Type Precision
Namespace MathNet.Numerics
Useful links:
Complex aThe first number
Complex bThe second number
booltrue if the two values differ by no more than 10 * 2^(-52); false otherwise.
float aThe first number
float bThe second number
booltrue if the two values differ by no more than 10 * 2^(-52); false otherwise.
double aThe first number
double bThe second number
booltrue if the two values differ by no more than 10 * 2^(-52); false otherwise.
float aThe first value.
float bThe second value.
int maxNumbersBetweenThe maximum number of floating point values between the two values. Must be 1 or larger.
boolif both floats are equal to each other within the specified tolerance; otherwise .
Determines the 'number' of floating point numbers between two values (i.e. the number of discrete steps between the two numbers) and then checks if that is within the specified tolerance. So if a tolerance of 1 is passed then the result will be true only if the two numbers have the same binary representation OR if they are two adjacent numbers that only differ by one step.
The comparison method used is explained in http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm. The article at http://www.extremeoptimization.com/resources/Articles/FPDotNetConceptsAndFormats.aspx explains how to transform the C code to .NET enabled code without using pointers and unsafe code.
double aThe first value.
double bThe second value.
long maxNumbersBetweenThe maximum number of floating point values between the two values. Must be 1 or larger.
boolif both doubles are equal to each other within the specified tolerance; otherwise .
T aThe first structure
T bThe second structure
booltrue if the two values differ by no more than 10 * 2^(-52); false otherwise.
The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by two so that we have half the range on each side of the numbers, e.g. if decimalPlaces == 2, then 0.01 will equal between 0.005 and 0.015, but not 0.02 and not 0.00
float aThe first value.
float bThe second value.
int decimalPlacesThe number of decimal places.
boolif both doubles are equal to each other within the specified number of decimal places; otherwise .
The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by two so that we have half the range on each side of the numbers, e.g. if decimalPlaces == 2, then 0.01 will equal between 0.005 and 0.015, but not 0.02 and not 0.00
double aThe first value.
double bThe second value.
int decimalPlacesThe number of decimal places.
boolif both doubles are equal to each other within the specified number of decimal places; otherwise .
IList<double> aThe first value list.
IList<double> bThe second value list.
double maximumErrorThe accuracy required for being almost equal.
boolif both doubles are almost equal up to the specified maximum error, otherwise.
IList<T> aThe first structure list.
IList<T> bThe second structure list.
double maximumErrorThe accuracy required for being almost equal.
boolif both doubles are almost equal up to the specified maximum error, otherwise.
double aThe first value.
double bThe second value.
double diffThe difference of the two values (according to some norm).
double maximumAbsoluteErrorThe absolute accuracy required for being almost equal.
boolif both doubles are almost equal up to the specified maximum absolute error, otherwise.
double aThe first value.
double bThe second value.
double diffThe difference of the two values (according to some norm).
double maximumErrorThe accuracy required for being almost equal.
boolif both doubles are almost equal up to the specified maximum error, otherwise.
float aThe first value.
float bThe second value.
double maximumErrorThe accuracy required for being almost equal.
boolif both complex are almost equal up to the specified maximum error, otherwise.
Complex aThe first value.
Complex bThe second value.
double maximumErrorThe accuracy required for being almost equal.
boolif both complex are almost equal up to the specified maximum error, otherwise.
double aThe first value.
double bThe second value.
double maximumErrorThe accuracy required for being almost equal.
boolif both doubles are almost equal up to the specified maximum error, otherwise.
T aThe first structure.
T bThe second structure.
double maximumErrorThe accuracy required for being almost equal.
boolif both doubles are almost equal up to the specified maximum relative error, otherwise.
double aThe first value.
double bThe second value.
double diffThe difference of the two values (according to some norm).
double maximumRelativeErrorThe relative accuracy required for being almost equal.
boolif both doubles are almost equal up to the specified maximum relative error, otherwise.
double aThe real number to coerce to zero, if it is almost zero.
doubleZero if | a | is smaller than 2^(-53) = 1.11e-16, a otherwise.
double aThe real number to coerce to zero, if it is almost zero.
double maximumAbsoluteErrorThe absolute threshold for a to consider it as zero.
doubleZero if | a | is smaller than maximumAbsoluteError , a otherwise.
double aThe real number to coerce to zero, if it is almost zero.
long maxNumbersBetweenThe maximum count of numbers between the zero and the number a.
doubleZero if | a | is fewer than maxNumbersBetween numbers from zero, a otherwise.
double aThe real number to coerce to zero, if it is almost zero.
int maxNumbersBetweenThe maximum count of numbers between the zero and the number a.
doubleZero if | a | is fewer than maxNumbersBetween numbers from zero, a otherwise.
double aThe first value.
double bThe second value.
long maxNumbersBetweenThe maximum error in terms of Units in Last Place ( ulps ), i.e. the maximum number of decimals that may be different. Must be 1 or larger.
int| -1 | a is smaller than b by more than the maxNumbersBetween tolerance. |
| 0 | a is equal to b within the maxNumbersBetween tolerance. |
| 1 | a is bigger than b by more than the maxNumbersBetween tolerance. |
double aThe first value.
double bThe second value.
int decimalPlacesThe number of decimal places on which the values must be compared. Must be 1 or larger.
int| -1 | a is smaller than b by more than a magnitude equal to decimalPlaces. |
| 0 | a is equal to b within a magnitude equal to decimalPlaces. |
| 1 | a is bigger than b by more than a magnitude equal to decimalPlaces. |
The decrementation step length depends on the provided value. Decrement(double.MinValue) will return negative infinity.
double valueThe value which should be decremented.
int countHow many times the number should be decremented.
doubleThe next smaller floating point value.
The decrementation step length depends on the provided value. Decrement(double.MinValue) will return negative infinity.
double valueThe value which should be decremented.
doubleThe next smaller floating point value.
Evaluates the epsilon. The more common positive epsilon is equal to two times this negative epsilon.
double valueThe value used to determine the minimum distance.
doubleRelative Epsilon (positive double or NaN).
double valueThe value.
doubleThe value of the number.
The incrementation step length depends on the provided value. Increment(double.MaxValue) will return positive infinity.
double valueThe value which needs to be incremented.
doubleThe next larger floating point value.
The incrementation step length depends on the provided value. Increment(double.MaxValue) will return positive infinity.
double valueThe value which needs to be incremented.
int countHow many times the number should be incremented.
doubleThe next larger floating point value.
first value is larger than the second value to within the tolerance or not. Equality comparison is based on the binary representation.
double aThe first value.
double bThe second value.
long maxNumbersBetweenThe maximum number of floating point values for which the two values are considered equal. Must be 1 or larger.
booltrue if the first value is larger than the second value; otherwise false.
first value is larger than the second value to within the specified number of decimal places or not. The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by two so that we have half the range on each side of the numbers, e.g. if decimalPlaces == 2, then 0.01 will equal between 0.005 and 0.015, but not 0.02 and not 0.00
double aThe first value.
double bThe second value.
int decimalPlacesThe number of decimal places.
booltrue if the first value is larger than the second value; otherwise false.
first value is smaller than the second value to within the tolerance or not. Equality comparison is based on the binary representation.
double aThe first value.
double bThe second value.
long maxNumbersBetweenThe maximum number of floating point values for which the two values are considered equal. Must be 1 or larger.
booltrue if the first value is smaller than the second value; otherwise false.
first value is smaller than the second value to within the tolerance or not. Equality comparison is based on the binary representation.
float aThe first value.
float bThe second value.
long maxNumbersBetweenThe maximum number of floating point values for which the two values are considered equal. Must be 1 or larger.
booltrue if the first value is smaller than the second value; otherwise false.
first value is smaller than the second value to within the specified number of decimal places or not. The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by two so that we have half the range on each side of th decimalPlaces g. if decimalPlaces == 2, then 0.01 will equal between 0.005 and 0.015, but not 0.02 and not 0.00
float aThe first value.
float bThe second value.
int decimalPlacesThe number of decimal places.
booltrue if the first value is smaller than the second value; otherwise false.
first value is smaller than the second value to within the specified number of decimal places or not. The values are equal if the difference between the two numbers is smaller than 10^(-numberOfDecimalPlaces). We divide by two so that we have half the range on each side of th decimalPlaces g. if decimalPlaces == 2, then 0.01 will equal between 0.005 and 0.015, but not 0.02 and not 0.00
double aThe first value.
double bThe second value.
int decimalPlacesThe number of decimal places.
booltrue if the first value is smaller than the second value; otherwise false.
float valueThe value.
intThe magnitude of the number.
double valueThe value.
intThe magnitude of the number.
double valueThe value.
long maxNumbersBetweenThe ulps difference.
doubleThe maximum floating point number which is maxNumbersBetween larger than the given value.
double valueThe value.
long maxNumbersBetweenThe ulps difference.
doubleThe minimum floating point number which is maxNumbersBetween smaller than the given value.
The second number is included in the number, thus two equal numbers evaluate to zero and two neighbor numbers evaluate to one. Therefore, what is returned is actually the count of numbers between plus 1.
double aThe first parameter.
double bThe second parameter.
ulongThe number of floating point values between a and b.
Evaluates the epsilon. See also EpsilonOf
double valueThe value used to determine the minimum distance.
doubleRelative Epsilon (positive double or NaN)
Value:
Value:
Value:
Value: