Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not quite. It's basically a combined mantissa and exponent test, so it can be thought of as functionally equivalent to scaling epsilon by a power of two (the shared exponent of the nearly equal floating point values) and then using that epsilon.

I think I'll just use scaled epsilon... though I've gotten lots of performance wins out of direct bitwise trickery with floats (e.g., fast rounding with mantissa normalization and casting).



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

Search: