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

Because of the representation of floats, couldn't you just bitwise cast to uints and see if the (abs) difference was less than or equal to one? But practically you probably should check if it's less than or equal to say ten, depending on your tolerance.


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

Search: