lrint.3 (140177) | lrint.3 (175309) |
---|---|
1.\" Copyright (c) 2005 David Schultz <das@FreeBSD.org> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" | 1.\" Copyright (c) 2005 David Schultz <das@FreeBSD.org> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" |
25.\" $FreeBSD: head/lib/msun/man/lrint.3 140177 2005-01-13 10:43:01Z ru $ | 25.\" $FreeBSD: head/lib/msun/man/lrint.3 175309 2008-01-14 02:12:07Z das $ |
26.\" | 26.\" |
27.Dd January 11, 2005 | 27.Dd January 13, 2008 |
28.Dt LRINT 3 29.Os 30.Sh NAME 31.Nm llrint , 32.Nm llrintf , | 28.Dt LRINT 3 29.Os 30.Sh NAME 31.Nm llrint , 32.Nm llrintf , |
33.Nm llrintl , |
|
33.Nm lrint , | 34.Nm lrint , |
34.Nm lrintf | 35.Nm lrintf , 36.Nm lrintl |
35.Nd "convert to integer" 36.Sh LIBRARY 37.Lb libm 38.Sh SYNOPSIS 39.In math.h 40.Ft "long long" 41.Fn llrint "double x" 42.Ft "long long" 43.Fn llrintf "float x" | 37.Nd "convert to integer" 38.Sh LIBRARY 39.Lb libm 40.Sh SYNOPSIS 41.In math.h 42.Ft "long long" 43.Fn llrint "double x" 44.Ft "long long" 45.Fn llrintf "float x" |
46.Ft "long long" 47.Fn llrintl "long double x" |
|
44.Ft long 45.Fn lrint "double x" 46.Ft long 47.Fn lrintf "float x" | 48.Ft long 49.Fn lrint "double x" 50.Ft long 51.Fn lrintf "float x" |
52.Ft long 53.Fn lrintl "long double x" |
|
48.Sh DESCRIPTION 49The 50.Fn lrint 51function returns the integer nearest to its argument 52.Fa x 53according to the current rounding mode. 54If the rounded result is too large to be represented as a 55.Vt long --- 9 unchanged lines hidden (view full) --- 65.Fn lrint x 66is equivalent to 67.Po Vt long Pc Ns Fn rint x 68(although the former may be more efficient). 69.Pp 70The 71.Fn llrint , 72.Fn llrintf , | 54.Sh DESCRIPTION 55The 56.Fn lrint 57function returns the integer nearest to its argument 58.Fa x 59according to the current rounding mode. 60If the rounded result is too large to be represented as a 61.Vt long --- 9 unchanged lines hidden (view full) --- 71.Fn lrint x 72is equivalent to 73.Po Vt long Pc Ns Fn rint x 74(although the former may be more efficient). 75.Pp 76The 77.Fn llrint , 78.Fn llrintf , |
79.Fn llrintl , 80.Fn lrintf , |
|
73and | 81and |
74.Fn lrintf | 82.Fn lrintl |
75functions differ from 76.Fn lrint 77only in their input and output types. 78.Sh SEE ALSO 79.Xr lround 3 , 80.Xr math 3 , 81.Xr rint 3 , 82.Xr round 3 83.Sh STANDARDS | 83functions differ from 84.Fn lrint 85only in their input and output types. 86.Sh SEE ALSO 87.Xr lround 3 , 88.Xr math 3 , 89.Xr rint 3 , 90.Xr round 3 91.Sh STANDARDS |
92These functions conform to 93.St -isoC-99 . 94.Sh HISTORY |
|
84The 85.Fn llrint , 86.Fn llrintf , 87.Fn lrint , 88and 89.Fn lrintf | 95The 96.Fn llrint , 97.Fn llrintf , 98.Fn lrint , 99and 100.Fn lrintf |
90functions conform to 91.St -isoC-99 . 92.Sh HISTORY 93These routines first appeared in | 101routines first appeared in |
94.Fx 5.4 . | 102.Fx 5.4 . |
103The long double variants were introduced in 104.Fx 8.0 . |
|