]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/trunc.3
Wrapped long lines, wrapped at sentence boundaries; stripped trailing
[thirdparty/man-pages.git] / man3 / trunc.3
1 .\" Copyright (C) 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.
11 .\"
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.
19 .\"
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 TRUNC 3 2001-05-31 "" "Linux Programmer's Manual"
24 .SH NAME
25 trunc, truncf, truncl \- round to integer, towards zero
26 .SH SYNOPSIS
27 .nf
28 .B #include <math.h>
29 .sp
30 .BI "double trunc(double " x );
31 .br
32 .BI "float truncf(float " x );
33 .br
34 .BI "long double truncl(long double " x );
35 .fi
36 .sp
37 Compile with \-std=c99; link with \-lm.
38 .SH DESCRIPTION
39 These functions round \fIx\fP to the nearest integer
40 not larger in absolute value.
41 .SH "RETURN VALUE"
42 The rounded integer value.
43 If \fIx\fP is integral, infinite or NaN, \fIx\fP itself is returned.
44 .SH ERRORS
45 None.
46 .SH "CONFORMING TO"
47 C99.
48 .SH "SEE ALSO"
49 .BR ceil (3),
50 .BR floor (3),
51 .BR lrint (3),
52 .BR nearbyint (3),
53 .BR rint (3),
54 .BR round (3)