OSDN Git Service

(split) LDP_man-pages: release ioctl.2 [JM:00378]
[linuxjm/LDP_man-pages.git] / draft / man3 / ldexp.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
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 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
30 .\" Modified 2004-10-31 by aeb
31 .\"
32 .\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
33 .\"       all rights reserved.
34 .\" Translated Thu Feb 13 23:14:00 JST 1997
35 .\"       by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
36 .\" Updated & Modified Sun Jun  6 10:35:26 JST 2004
37 .\"       by Yuichi SATO <ysato444@yahoo.co.jp>
38 .\" Updated & Modified Sat Jan 15 05:40:56 JST 2005 by Yuichi SATO
39 .\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
40 .\"
41 .TH LDEXP 3 2010-09-20 "" "Linux Programmer's Manual"
42 .\"O .SH NAME
43 .SH Ì¾Á°
44 .\"O ldexp, ldexpf, ldexpl \- multiply floating-point number by integral power of 2
45 ldexp, ldexpf, ldexpl \- ÉâÆ°¾®¿ôÅÀ¼Â¿ô¤È 2 ¤ÎÀ°¿ô¾è¤È¤ÎÀѤò·×»»¤¹¤ë
46 .\"O .SH SYNOPSIS
47 .SH ½ñ¼°
48 .nf
49 .B #include <math.h>
50 .sp
51 .BI "double ldexp(double " x ", int " exp );
52 .br
53 .BI "float ldexpf(float " x ", int " exp );
54 .br
55 .BI "long double ldexpl(long double " x ", int " exp );
56 .fi
57 .sp
58 .\"O Link with \fI\-lm\fP.
59 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
60 .sp
61 .in -4n
62 .\"O Feature Test Macro Requirements for glibc (see
63 .\"O .BR feature_test_macros (7)):
64 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
65 .RB ( feature_test_macros (7)
66 »²¾È):
67 .in
68 .sp
69 .ad l
70 .BR ldexpf (),
71 .BR ldexpl ():
72 .RS 4
73 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
74 _POSIX_C_SOURCE\ >=\ 200112L;
75 .br
76 or
77 .I cc\ -std=c99
78 .RE
79 .ad
80 .\"O .SH DESCRIPTION
81 .SH ÀâÌÀ
82 .\"O The
83 .\"O .BR ldexp ()
84 .\"O function returns the result of multiplying the floating-point number
85 .\"O .I x
86 .\"O by 2 raised to the power
87 .\"O .IR exp .
88 .BR ldexp ()
89 ´Ø¿ô¤Ï¡¢ÉâÆ°¾®¿ôÅÀ¼Â¿ô
90 .I x
91 ¤È 2 ¤Î
92 .I exp
93 ¾è¤È¤ÎÀѤòÊÖ¤¹¡£
94 .\"O .SH RETURN VALUE
95 .SH ÊÖ¤êÃÍ
96 .\"O On success, these functions return
97 .\"O .IR "x * (2^exp)" .
98 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
99 .I "x * (2^exp)"
100 ¤òÊÖ¤¹¡£
101
102 .\"O If
103 .\"O .I exp
104 .\"O is zero, then
105 .\"O .I x
106 .\"O is returned.
107 .I exp
108 ¤¬¥¼¥í¤Î¾ì¹ç¡¢
109 .I x
110 ¤¬ÊÖ¤µ¤ì¤ë¡£
111
112 .\"O If
113 .\"O .I x
114 .\"O is a NaN,
115 .\"O a NaN is returned.
116 .I x
117 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
118
119 .\"O If
120 .\"O .I x
121 .\"O is positive infinity (negative infinity),
122 .\"O positive infinity (negative infinity) is returned.
123 .I x
124 ¤¬Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤Î¾ì¹ç¡¢
125 Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤¬ÊÖ¤µ¤ì¤ë¡£
126
127 .\"O If the result underflows,
128 .\"O an  range error occurs,
129 .\"O and zero is returned.
130 ·ë²Ì¤¬¥¢¥ó¥À¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢
131 ÈÏ°Ï¥¨¥é¡¼ (range error) ¤¬È¯À¸¤·¡¢¥¼¥í¤¬ÊÖ¤µ¤ì¤ë¡£
132
133 .\"O If the result overflows,
134 .\"O a range error occurs,
135 .\"O and the functions return
136 .\"O .BR HUGE_VAL ,
137 .\"O .BR HUGE_VALF ,
138 .\"O or
139 .\"O .BR HUGE_VALL ,
140 .\"O respectively, with a sign the same as
141 .\"O .IR x .
142 ·ë²Ì¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢ÈÏ°Ï¥¨¥é¡¼¤¬È¯À¸¤·¡¢
143 ³Æ´Ø¿ô¤Ï¤½¤ì¤¾¤ì
144 .BR HUGE_VAL ,
145 .BR HUGE_VALF ,
146 .B HUGE_VALL
147 ¤òÊÖ¤¹¡£ÊÖ¤êÃͤÎÉä¹æ¤Ï
148 .I x
149 ¤ÈƱ¤¸¤È¤Ê¤ë¡£
150 .\"O .SH ERRORS
151 .SH ¥¨¥é¡¼
152 .\"O See
153 .\"O .BR math_error (7)
154 .\"O for information on how to determine whether an error has occurred
155 .\"O when calling these functions.
156 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
157 .BR math_error (7)
158 ¤ò»²¾È¤Î¤³¤È¡£
159 .PP
160 .\"O The following errors can occur:
161 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
162 .TP
163 .\"O Range error, overflow
164 ÈÏ°Ï¥¨¥é¡¼: ·ë²Ì¤Î¥ª¡¼¥Ð¡¼¥Õ¥í¡¼
165 .\"O .I errno
166 .\"O is set to
167 .\"O .BR ERANGE .
168 .\"O An overflow floating-point exception
169 .\"O .RB ( FE_OVERFLOW )
170 .\"O is raised.
171 .I errno
172 ¤Ë
173 .B ERANGE
174 ¤¬ÀßÄꤵ¤ì¤ë¡£
175 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
176 .RB ( FE_OVERFLOW )
177 ¤¬¾å¤¬¤ë¡£
178 .TP
179 .\"O Range error, underflow
180 ÈÏ°Ï¥¨¥é¡¼: ·ë²Ì¤Î¥¢¥ó¥À¡¼¥Õ¥í¡¼
181 .\"O .I errno
182 .\"O is set to
183 .\"O .BR ERANGE .
184 .\"O An underflow floating-point exception
185 .\"O .RB ( FE_UNDERFLOW )
186 .\"O is raised.
187 .I errno
188 ¤Ë
189 .B ERANGE
190 ¤¬ÀßÄꤵ¤ì¤ë¡£
191 ¥¢¥ó¥À¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
192 .RB ( FE_UNDERFLOW )
193 ¤¬¾å¤¬¤ë¡£
194 .\"O .SH "CONFORMING TO"
195 .SH ½àµò
196 C99, POSIX.1-2001.
197 .\"O The variant returning
198 .\"O .I double
199 .\"O also conforms to
200 .\"O SVr4, 4.3BSD, C89.
201 .I double
202 ÈǤδؿô¤Ï SVr4, 4.3BSD, C89 ¤Ë¤â½àµò¤·¤Æ¤¤¤ë¡£
203 .\"O .SH "SEE ALSO"
204 .SH ´ØÏ¢¹àÌÜ
205 .BR frexp (3),
206 .BR modf (3),
207 .BR scalbln (3)