|expression||Single or Double||The numeric expression that your are testing against NumValue.|
|maxUlps||Int32||The number of units in the last position that are used to denote the acceptable range in the test of equality. The default is 1. If you pass zero, then the test is the same as with =.|
|numValue||Single or Double||The numeric expression that Expression is being compared to.|
|Result||Boolean||True if Expression and NumValue are equal within the tolerance specified by MaxUlps.|
Use Equals rather than = when you need to determine whether two floating point numbers are close enough in value to be considered “equal.” This can be used to account for the imprecision of floating point division on computers, for example. It allows for a user-specified rounding error.
The MaxUlps parameter allows you to specify the allowable range of values. For example:
The values of x which will satisfy the equality test are: 10000.000000000002, 10000.0 and 9999.999999999998.
MsgBox "The comparison is True"