Once in a while, I find myself rounding some numbers, and I always have to cast the result to an integer:
int rounded = (int) floor(value);
That's because float's range is wider than int's. What would you expect to have if the value returned by these functions did not fit into an int? That would be undefined behaviour and you would be unable to check for that in your program.
float
int