Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Comparing Floating Point Numbers | Better HN
Comparing Floating Point Numbers
(altdevblogaday.com)
8 points · by
forrestthewoods
· 14y ago · 2 comments
Comments
[–]
CountHackulus
14y ago
There's far more to it than I originally thought. Using epsilon = 0.00001f had been working fine for me, but now I see just how wrong that could've been in certain cases.
Definitely keeping this around for reference.
[–]
Tatyanazaxarova
14y ago
P.S. Do you want find all float==float? Try PVS-Studio rule: V550. An odd precise comparison.
http://www.viva64.com/en/d/0141/