]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/ceil.3
Wrapped long lines, wrapped at sentence boundaries; stripped trailing
[thirdparty/man-pages.git] / man3 / ceil.3
CommitLineData
fea681da
MK
1.\" Copyright 2001 Andries Brouwer <aeb@cwi.nl>.
2.\"
3.\" Permission is granted to make and distribute verbatim copies of this
4.\" manual provided the copyright notice and this permission notice are
5.\" preserved on all copies.
6.\"
7.\" Permission is granted to copy and distribute modified versions of this
8.\" manual under the conditions for verbatim copying, provided that the
9.\" entire resulting derived work is distributed under the terms of a
10.\" permission notice identical to this one.
c13182ef 11.\"
fea681da
MK
12.\" Since the Linux kernel and libraries are constantly changing, this
13.\" manual page may be incorrect or out-of-date. The author(s) assume no
14.\" responsibility for errors or omissions, or for damages resulting from
15.\" the use of the information contained herein. The author(s) may not
16.\" have taken the same level of care in the production of this manual,
17.\" which is licensed free of charge, as they might when working
18.\" professionally.
c13182ef 19.\"
fea681da
MK
20.\" Formatted or processed versions of this manual, if unaccompanied by
21.\" the source, must acknowledge the copyright and authors of this work.
22.\"
23.TH CEIL 3 2001-05-31 "" "Linux Programmer's Manual"
24.SH NAME
c13182ef 25ceil, ceilf, ceill \- ceiling function: smallest integral value not
35478399 26less than argument
fea681da
MK
27.SH SYNOPSIS
28.nf
29.B #include <math.h>
30.sp
31.BI "double ceil(double " x );
32.br
33.BI "float ceilf(float " x );
34.br
35.BI "long double ceill(long double " x );
36.fi
37.sp
38Link with \-lm.
39.SH DESCRIPTION
40These functions round \fIx\fP up to the nearest integer.
41.SH "RETURN VALUE"
c13182ef
MK
42The rounded integer value.
43If \fIx\fP is integral or infinite,
fea681da
MK
44\fIx\fP itself is returned.
45.SH ERRORS
46No errors other than EDOM and ERANGE can occur.
47If \fIx\fP is NaN, then NaN is returned and
48.I errno
49may be set to EDOM.
50.SH NOTES
68e1685c 51SUSv2 and POSIX.1-2001 contain text about overflow (which might set
fea681da
MK
52.I errno
53to ERANGE, or raise an exception).
54In practice, the result cannot overflow on any current machine,
55so this error-handling stuff is just nonsense.
56(More precisely, overflow can happen only when the maximum value
57of the exponent is smaller than the number of mantissa bits.
58For the IEEE-754 standard 32-bit and 64-bit floating point numbers
59the maximum value of the exponent is 128 (resp. 1024), and the number
60of mantissa bits is 24 (resp. 53).)
61.SH "CONFORMING TO"
62The
63aa9df0 63.BR ceil ()
68e1685c 64function conforms to SVr4, POSIX.1-2001, 4.3BSD, C89, C99.
fea681da
MK
65The other functions are from C99.
66.SH "SEE ALSO"
67.BR floor (3),
68.BR lrint (3),
69.BR nearbyint (3),
70.BR rint (3),
71.BR round (3),
72.BR trunc (3)