Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
thisisanacc
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
thisisanacc
11y ago
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/