cceeiill() -- Mathematics Function (libm)

Set numeric ceiling
#iinncclluuddee <mmaatthh.hh>
ddoouubbllee cceeiill(_z) ddoouubbllee _z;

cceeiill() returns a  double-precision floating-point number whose value is the
smallest integer greater than or equal to _z.

_E_x_a_m_p_l_e
The following example demonstrates how to use cceeiill():

#include <errno.h>
#include <math.h>
#include <stdio.h>
#define display(x) dodisplay((double)(x), #x)

dodisplay(value, name)
double value; char *name;
{
    if (errno)
        perror(name);
    else
        printf("%10g %s\n", value, name);
    errno = 0;
}

main()
{
    extern char *gets();
    double x;
    char string[64];

    for (;;) {
        printf("Enter number: ");
        if (gets(string) == NULL)
            break;
        x = atof(string);

        display(x);
        display(ceil(x));
        display(floor(x));
        display(fabs(x));
    }
    putchar('\n');
}

_S_e_e _A_l_s_o
aabbss(), ffaabbss(), fflloooorr(), ffrreexxpp(), lliibbmm
ANSI Standard, section 7.5.6.1
POSIX Standard, section 8.1
