Hacker News new | past | comments | ask | show | jobs | submit login

Naive because it's just the easiest way. (Also, right, I forgot abs.)

I imagine the downside with a chosen "epsilon" (which I used as an alias for any tolerance) is that it can be truncated on some machines, plus this equation on its own doesn't do relative accuracy.

On an LEGO EV3, Python's float is 1e38 max with 7 significant digits.

I've never run into problems, which is why I keep using it, too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: