]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/lrint.3
hyphenation fixes
[thirdparty/man-pages.git] / man3 / lrint.3
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.
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 LRINT 3 2007-07-26 "" "Linux Programmer's Manual"
24 .SH NAME
25 lrint, lrintf, lrintl, llrint, llrintf, llrintl \- round to nearest integer
26 .SH SYNOPSIS
27 .nf
28 .B #include <math.h>
29 .sp
30 .BI "long int lrint(double " x );
31 .br
32 .BI "long int lrintf(float " x );
33 .br
34 .BI "long int lrintl(long double " x );
35 .sp
36 .BI "long long int llrint(double " x );
37 .br
38 .BI "long long int llrintf(float " x );
39 .br
40 .BI "long long int llrintl(long double " x );
41 .fi
42 .sp
43 Link with \fI\-lm\fP.
44 .sp
45 .in -4n
46 Feature Test Macro Requirements for glibc (see
47 .BR feature_test_macros (7)):
48 .in
49 .sp
50 .ad l
51 All functions shown above:
52 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
53 .I cc\ -std=c99
54 .ad b
55 .SH DESCRIPTION
56 These functions round their argument to the nearest integer value,
57 using the current rounding direction.
58 If \fIx\fP is infinite or NaN, or if the rounded value is outside
59 the range of the return type, the numeric result is unspecified.
60 A domain error may occur if the magnitude of \fIx\fP is too large.
61 .SH "RETURN VALUE"
62 The rounded integer value.
63 .SH ERRORS
64 .TP
65 .B EDOM
66 The magnitude of \fIx\fP is too large and
67 .I "(math_errhandling & MATH_ERRNO)"
68 is nonzero.
69 .SH "CONFORMING TO"
70 C99.
71 .SH "SEE ALSO"
72 .BR ceil (3),
73 .BR floor (3),
74 .BR lround (3),
75 .BR nearbyint (3),
76 .BR rint (3),
77 .BR round (3)