Public Function ApproxComplex( _ ByVal vX As Variant _ , ByVal vY As Variant _ , Optional ByVal vEpsilon As Variant _ ) As Variant
ApproxComplex(34.6, 34.59999999) = False ApproxComplex(34.6, 34.599999999999) = True ApproxComplex("SA", "sa") = False ApproxComplex("SA", "SA") = TrueSee also:
Approx Function Debug.Assert (Visual Basic)vX: First of two numbers that are compared to see if they are approximately equal. Function returns Null if vX is Null or cannot be fixed up to a real or complex number (as defined by the ComplexStringToReals function).
vY: Second of two numbers that are compared to see if they are approximately equal. Function returns Null if vY is Null or cannot be fixed up to a real or complex number.
Note: If either of the arguments are not numbers, this function compares the values using the EqualLikeDataType function; it passes the arguments to that function and returns its result. In this case, it uses EqualLikeDataType with the Compare Mode of vbBinaryCompare.
vEpsilon: Defines the range of "approximate" values as defined below. vEpsilon defaults to 1E-13 (10 ^ -13) if it is Null of cannot be fixed up to a (real) number.
Definition:
If Y == 0: Abs(X) < Epsilon If Y <> 0: Abs(Y - X) / Y) < Epsilonv1.5 BugFix: Fixed this function to use the vEpsilon argument instead of always using mcDOUBLE_EPSILON, which was 1E-13.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.