News for hackers. Stuff that matters.
Re:Comparing Floating-Point Numbers Is Tricky by hcrisp on Thursday March 30, 2017 @07:29PM (#13999871)
There was a very good article explaining this using MATLAB, but I can't find it right now. This one is pretty close and explains the concepts of overflow, underflow, etc. The diagrams about "eps" are pretty good, even if your language of choice is Python, C/C++, etc.

http://blogs.mathworks.com/cleve/2014/07/07/floating-point-n...

Re:Comparing Floating-Point Numbers Is Tricky by ubernostrum on Friday March 31, 2017 @01:30AM (#14001353)
Python has math.isclose() in the standard library, with configurable tolerances:

https://docs.python.org/3/library/math.html#math.isclose