OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / lrint.3
1 .\" Copyright 2001 Andries Brouwer <aeb@cwi.nl>.
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\"     <mtk.manpages@gmail.com>
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Japanese Version Copyright (c) 2001, 2005 Yuichi SATO
26 .\"         all rights reserved.
27 .\" Translated Sun Jul  8 11:59:22 JST 2001
28 .\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
29 .\" Updated & Modified Sat Jan 15 22:39:05 JST 2005
30 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
31 .\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
32 .\"
33 .TH LRINT 3  2008-08-11 "" "Linux Programmer's Manual"
34 .\"O .SH NAME
35 .SH Ì¾Á°
36 .\"O lrint, lrintf, lrintl, llrint, llrintf, llrintl \- round to nearest integer
37 lrint, lrintf, lrintl, llrint, llrintf, llrintl \- ºÇ¤â¶á¤¤À°¿ôÃͤ˴ݤá¤ë
38 .\"O .SH SYNOPSIS
39 .SH ½ñ¼°
40 .nf
41 .B #include <math.h>
42 .sp
43 .BI "long int lrint(double " x );
44 .br
45 .BI "long int lrintf(float " x );
46 .br
47 .BI "long int lrintl(long double " x );
48 .sp
49 .BI "long long int llrint(double " x );
50 .br
51 .BI "long long int llrintf(float " x );
52 .br
53 .BI "long long int llrintl(long double " x );
54 .fi
55 .sp
56 .\"O Link with \fI\-lm\fP.
57 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
58 .sp
59 .in -4n
60 .\"O Feature Test Macro Requirements for glibc (see
61 .\"O .BR feature_test_macros (7)):
62 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
63 .RB ( feature_test_macros (7)
64 »²¾È):
65 .in
66 .sp
67 .ad l
68 All functions shown above:
69 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
70 .I cc\ -std=c99
71 .ad b
72 .\"O .SH DESCRIPTION
73 .SH ÀâÌÀ
74 .\"O These functions round their argument to the nearest integer value,
75 .\"O using the current rounding direction (see
76 .\"O .BR fesetround (3)).
77 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢¸½ºß¤Î´Ý¤áÊý¸þ¤Ë´ð¤Å¤­¡¢ºÇ¤â¶á¤¤À°¿ô¤Ë°ú¤­¿ô¤ò´Ý¤á¤ë
78 (¸½ºß¤Î´Ý¤áÊý¸þ¤Ë¤Ä¤¤¤Æ¤Ï
79 .BR fesetround (3)
80 ¤ò»²¾È)¡£
81
82 .\"O Note that unlike
83 .\"O .BR rint (3),
84 .\"O etc., the return type of these functions differs from
85 .\"O that of their arguments.
86 .BR rint (3)
87 ¤È°ã¤¤¡¢¤³¤ì¤é¤Î´Ø¿ô¤ÎÊÖ¤êÃͤη¿¤Ï°ú¤­¿ô¤Î·¿¤È°Û¤Ê¤ëÅÀ¤ËÃí°Õ¤¹¤ë¤³¤È¡£
88 .\"O .SH "RETURN VALUE"
89 .SH ÊÖ¤êÃÍ
90 .\"O These functions return the rounded integer value.
91 ¤³¤ì¤é¤Î´Ø¿ô¤Ï´Ý¤á¤¿À°¿ôÃͤòÊÖ¤¹¡£
92
93 .\"O If
94 .\"O .I x
95 .\"O is a NaN or an infinity,
96 .\"O or the rounded value is too large to be stored in a
97 .\"O .I long
98 .\"O .RI ( "long long"
99 .\"O in the case of the
100 .\"O .B ll*
101 .\"O functions)
102 .\"O then a domain error occurs, and the return value is unspecified.
103 .I x
104 ¤¬ NaN ¤«Ìµ¸ÂÂç¤Î¾ì¹ç¡¢¤â¤·¤¯¤Ï´Ý¤á¤¿Ãͤ¬Â礭²á¤®¤Æ
105 .I long
106 .RB ( ll*
107 ´Ø¿ô¤Î¾ì¹ç¤Ë¤Ï
108 .IR "long long" )
109 ¤Ë³ÊǼ¤Ç¤­¤Ê¤¤¾ì¹ç¡¢
110 Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢ÊÖ¤êÃͤÏÉÔÄê¤È¤Ê¤ë¡£
111 .\" The return value is -(LONG_MAX - 1) or -(LLONG_MAX -1)
112 .\"O .SH ERRORS
113 .SH ¥¨¥é¡¼
114 .\"O See
115 .\"O .BR math_error (7)
116 .\"O for information on how to determine whether an error has occurred
117 .\"O when calling these functions.
118 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
119 .BR math_error (7)
120 ¤ò»²¾È¤Î¤³¤È¡£
121 .PP
122 .\"O The following errors can occur:
123 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
124 .TP
125 .\"O Domain error: \fIx\fP is a NaN or infinite, or the rounded value is too large
126 Îΰ襨¥é¡¼: \fIx\fP ¤¬ NaN ¤«Ìµ¸ÂÂç¡¢¤â¤·¤¯¤Ï´Ý¤á¤¿Ãͤ¬Â礭²á¤®¤ë
127 .\" .I errno
128 .\" is set to
129 .\" .BR EDOM .
130 .\"O An invalid floating-point exception
131 .\"O .RB ( FE_INVALID )
132 .\"O is raised.
133 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
134 .RB ( FE_INVALID )
135 ¤¬¾å¤¬¤ë¡£
136 .PP
137 .\"O These functions do not set
138 .\"O .IR errno .
139 ¤³¤ì¤é¤Î´Ø¿ô¤Ï
140 .I errno
141 ¤òÀßÄꤷ¤Ê¤¤¡£
142 .\" FIXME . Is it intentional that these functions do not set errno?
143 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6798
144 .\"O .SH VERSIONS
145 .SH ¥Ð¡¼¥¸¥ç¥ó
146 .\"O These functions first appeared in glibc in version 2.1.
147 ¤³¤ì¤é¤Î´Ø¿ô¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.1 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
148 .\"O .SH "CONFORMING TO"
149 .SH ½àµò
150 C99, POSIX.1-2001.
151 .\"O .SH "SEE ALSO"
152 .SH ´ØÏ¢¹àÌÜ
153 .BR ceil (3),
154 .BR floor (3),
155 .BR lround (3),
156 .BR nearbyint (3),
157 .BR rint (3),
158 .BR round (3)