Everything

ceil / ceilf / ceill


Returns the smallest integral value not less than or equal to the given floating-point number.

[Format]

#include <math.h>

double ceil (double d);

float ceilf (float d);

long double ceill (long double d);

[Parameters]

d Floating-point number for which smallest integral value not less than that number is to be computed

[Return values]

Smallest integral value not less than or equal to d

[Remarks]

The ceil function returns the smallest integral value not less than or equal to d, expressed as a double type value. Therefore, if d is negative, the value after truncation of the fractional part is returned.