related to:
- comparing ieee floats and doubles for equality
- Should we compare floating point numbers for equality against a relative error
- Most effective way for float and double comparison
However with regard to 80 bit IEEE floats (see section 8.2) on an x86
In particular I like the this implementation using a count of representable values between the operands because it scale by default.
One use case would be for numeric approximations where two values approach each other and I need to check to see if they are close enough.
p.s. The implementation language will be D but I can translate. Also an implementation that can automatically handle whatever the underlying type is (for instance if only 64bit real was available) would be ideal.