News for hackers. Stuff that matters.
Re:There Are Only Four Billion Floats–So Test Them All (2014) by zerocrates on Thursday February 09, 2023 @04:49PM (#34732037)
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.

There are no comments on this comment yet.