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

This is in the context of the implementation of a ciel() function: a very small but still positive float should have a ciel() of 1. As said near this part, IEEE default rounding is round half to nearest even: 0.5 rounds to 0, the closest even integer, so if your addition of 0.5 to the argument to ciel() results in exactly 0.5, the result will incorrectly be 0 instead of 1.


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

Search: