2.1.16.5.1 ceil


Description

Calculates the double value corresponding to the smallest integer that is greater than or equal to x.

Syntax

double ceil( double x )

Parameters

x
[input] independent variable

Return

ceil(x)

Examples

EX1

void    ceil_ex1()
{
    double    x1 = -4.6, x2 = 4.6;
    
    printf("ceil(%f) = %f\nceil(%f) = %f\n", x1, ceil(x1), x2, ceil(x2));
}

Remark

See Also

floor

Header to Include

origin.h

Reference