HNHacker News
TopNewBestAskShowJobs

thisisanacc

9 karma · joined July 6, 2015

submissionscomments
thisisanacc··on Essential facts about floating point calculations

    if( abs(x - y) < 1e-6 ).
Testing for absolute error is often incorrect. Here is a better floating point comparator:

http://floating-point-gui.de/errors/comparison/