Description

Return Values

Upon successful completion, the ceil(), ceilf(), and ceill() functions return the smallest
integral value not less than x, expressed as a type double, float,
or long double, respectively.

If x is NaN, a NaN is returned.

If x is ±0 or ±Inf, x is returned.

Usage

The integral value returned by these functions need not be expressible as
an int or long int. The return value should be tested before assigning
it to an integer type to avoid the undefined results of an
integer overflow.