¡@

Home 

c++ Programming Glossary: ulp

Floating point comparison revisited

http://stackoverflow.com/questions/13940316/floating-point-comparison-revisited

checking whether two values are within a fixed number of ULPs of each other. Thus for example a very large number compares.. in floating point by different means may differ by many ULP even though they would be equal if calculated by exact mathematics... of their code. As an example of why a default of 4 ULP is bad consider 1. 49 49 1 . The mathematically exact result..