 | CARM User's Guide Discontinued |  |
|
|
| ceil| Summary |
#include <math.h>
double ceil (
double val); /* number to calculate ceiling for */
| | Description | The ceil function calculates the smallest integer value that is greater than or equal to val. | | Return Value | The ceil function returns a float that contains the smallest integer value that is not less than val. | | See Also | floor | | Example |
#include <math.h>
#include <stdio.h> /* for printf */
void tst_ceil (void) {
float x;
float y;
x = 45.998;
y = ceil (x);
printf ("CEIL(%f) = %f\n", x, y);
/* output is "CEIL(45.998) = 46" */
}
|
|
|