1ceil(3M) Mathematical Library Functions ceil(3M)
2
3
4
6 ceil, ceilf, ceill - ceiling value function
7
9 c99 [ flag... ] file... -lm [ library... ]
10 #include <math.h>
11
12 double ceil(double x);
13
14
15 float ceilf(float x);
16
17
18 long double ceill(long double x);
19
20
22 These functions compute the smallest integral value not less than x.
23
25 Upon successful completion, the ceil(), ceilf(), and ceill() functions
26 return the smallest integral value not less than x, expressed as a type
27 double, float, or long double, respectively.
28
29
30 If x is NaN, a NaN is returned.
31
32
33 If x is ±0 or ±Inf, x is returned.
34
36 The integral value returned by these functions need not be expressible
37 as an int or long int. The return value should be tested before assign‐
38 ing it to an integer type to avoid the undefined results of an integer
39 overflow.
40
42 See attributes(5) for descriptions of the following attributes:
43
44
45
46
47 ┌─────────────────────────────┬─────────────────────────────┐
48 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
49 ├─────────────────────────────┼─────────────────────────────┤
50 │Interface Stability │Standard │
51 ├─────────────────────────────┼─────────────────────────────┤
52 │MT-Level │MT-Safe │
53 └─────────────────────────────┴─────────────────────────────┘
54
56 feclearexcept(3M), fetestexcept(3M), floor(3M), isnan(3M),
57 math.h(3HEAD), attributes(5), standards(5)
58
59
60
61SunOS 5.11 12 Jul 2006 ceil(3M)