"Several of the ceil functions were implemented by adding 0.5 to the input value and rounding to nearest."
What sort of clown would make that mistake and yet think they are capable of writing a floating point library?
What sort of clown would make that mistake and yet think they are capable of writing a floating point library?
ceil(5) should be 5
So, if ceil(x) is implemented as round(x+0.5) then: ceil(4) = round(4.5) = 4 ceil(5) = round(5.5) = 6
The first of those is correct. The second is incorrect.
Such effects and similar should be well known to anyone taking on the responsibility to develop a floating point library.