- MathAbs
- MathArccos
- MathArcsin
- MathArctan
- MathArctan2
- MathClassify
- MathCeil
- MathCos
- MathExp
- MathFloor
- MathLog
- MathLog10
- MathMax
- MathMin
- MathMod
- MathPow
- MathRand
- MathRound
- MathSin
- MathSqrt
- MathSrand
- MathTan
- MathExpm1
- MathLog1p
- MathArccosh
- MathArcsinh
- MathArctanh
- MathCosh
- MathSinh
- MathTanh
- MathSwap
- MathIsValidNumber
- MathCompareByDigits
MathCompareByDigits
Compares two numbers for equality to the specified number of significant digits.
bool MathCompareByDigits(
|
Parameters
value1
[in] First number to compare.
value2
[in] Second number to compare.
digits
[in] Number of significant digits to compare.
Return Value
Returns true if the compared numbers match to digits significant digits. Otherwise, returns false.
Note
The function is useful when the order of magnitude of the compared numbers is not known in advance, and also for complex numbers whose real and imaginary parts can differ significantly in magnitude. In other cases, it is better to use epsilon-based comparison.
If one of the values is 0, comparison is not performed. In this case, use epsilon-based comparison. For complex numbers, real and imaginary parts are compared pairwise.