- left
- First floating point value to be compared
- right
- Second floating point value t be compared
- maxUlps
- Maximum number of representable floating point values that are allowed to be between the left and the right floating point values
True if both numbers are equal or close to being equal
Floating point values can only represent a finite subset of natural numbers. For example, the values 2.00000000 and 2.00000024 can be stored in a float, but nothing inbetween them.
This comparison will count how many possible floating point values are between the left and the right number. If the number of possible values between both numbers is less than or equal to maxUlps, then the numbers are considered as being equal.
Implementation partially follows the code outlined here: http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/