OSDN Git Service

c62d0bbd139e6dc03796c3d68bde6476922ba41a
[linuxjm/LDP_man-pages.git] / draft / man3 / scalb.3
1 .\" Copyright 2004 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) 2005 Yuichi SATO all rights reserved.
26 .\" and Copyright (c) 2008 Akihiro MOTOKI
27 .\" Translated Tue Feb  1 07:25:51 JST 2005
28 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
29 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
30 .\"
31 .TH SCALB 3 2010-09-20 "" "Linux Programmer's Manual"
32 .\"O .SH NAME
33 .SH Ì¾Á°
34 .\"O scalb, scalbf, scalbl \- multiply floating-point number
35 .\"O by integral power of radix (OBSOLETE)
36 scalb, scalbf, scalbl \- ÉâÆ°¾®¿ôÅÀ¿ô¤ËÀ°¿ô¤Ç¤¢¤ë´ð¿ô¤ÎÎß¾è¤ò³Ý¤±¤ë (ÇÑ»ßͽÄê)
37 .\"O .SH SYNOPSIS
38 .SH ½ñ¼°
39 .B #include <math.h>
40 .sp
41 .BI "double scalb(double " x ", double " exp );
42 .br
43 .BI "float scalbf(float " x ", double " exp );
44 .br
45 .BI "long double scalbl(long double " x ", double " exp );
46 .sp
47 .\"O Link with \fI\-lm\fP.
48 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
49 .sp
50 .in -4n
51 .\"O Feature Test Macro Requirements for glibc (see
52 .\"O .BR feature_test_macros (7)):
53 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
54 .RB ( feature_test_macros (7)
55 »²¾È):
56 .in
57 .sp
58 .ad l
59 .BR scalb ():
60 .RS 4
61 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
62 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
63 .RE
64 .br
65 .BR scalbf (),
66 .BR scalbl ():
67 .RS 4
68 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600
69 .RE
70 .ad b
71 .\"O .SH DESCRIPTION
72 .SH ÀâÌÀ
73 .\"O These functions multiply their first argument
74 .\"O .I x
75 .\"O by
76 .\"O .B FLT_RADIX
77 .\"O (probably 2)
78 .\"O to the power of
79 .\"O .IR exp ,
80 .\"O that is:
81 ¤³¤ì¤é¤Î´Ø¿ô¤ÏºÇ½é¤Î°ú¤­¿ô
82 .I x
83 ¤Ë
84 .B FLT_RADIX
85 ¤Î
86 .I exp
87 ¾è¤ò³Ý¤±¤ë
88 .RB ( FLT_RADIX
89 ¤Ï¤ª¤½¤é¤¯ 2 ¤Ç¤¢¤ë)¡£¤Ä¤Þ¤ê¡¢°Ê²¼¤Î¼°¤ÎÃͤòÊÖ¤¹¡£
90 .nf
91
92     x * FLT_RADIX ** exp
93 .fi
94
95 .\"O The definition of
96 .\"O .B FLT_RADIX
97 .\"O can be obtained by including
98 .\"O .I <float.h> .
99 .B FLT_RADIX
100 ¤ÎÄêµÁ¤Ï
101 .I <float.h>
102 ¤ò¥¤¥ó¥¯¥ë¡¼¥É¤¹¤ë¤³¤È¤ÇÆÀ¤é¤ì¤ë¡£
103 .\"O .\" not in /usr/include but in a gcc lib
104 .\" /usr/include ¤Ç¤Ï¤Ê¤¯¡¢gcc ¤Î lib ¤Ë¤¢¤ë¡£
105 .\"O .SH RETURN VALUE
106 .SH ÊÖ¤êÃÍ
107 .\"O On success, these functions return \fIx\fP * \fBFLT_RADIX\fP ** \fIexp\fP.
108 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï \fIx\fP * \fBFLT_RADIX\fP ** \fIexp\fP ¤òÊÖ¤¹¡£
109
110 .\"O If
111 .\"O .I x
112 .\"O or
113 .\"O .I exp
114 .\"O is a NaN, a NaN is returned.
115 .I x
116 ¤«
117 .I exp
118 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
119
120 .\"O If
121 .\"O .I x
122 .\"O is positive infinity (negative infinity),
123 .\"O and
124 .\"O .I exp
125 .\"O is not negative infinity,
126 .\"O positive infinity (negative infinity) is returned.
127 .I x
128 ¤¬Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤Ç
129 .I exp
130 ¤¬Éé¤Î̵¸ÂÂç¤Ç¤Ê¤¤¾ì¹ç¡¢Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤¬ÊÖ¤µ¤ì¤ë¡£
131
132 .\"O If
133 .\"O .I x
134 .\"O is +0 (\-0), and
135 .\"O .I exp
136 .\"O is not positive infinity, +0 (\-0) is returned.
137 .I x
138 ¤¬ +0 (\-0) ¤Ç
139 .I exp
140 ¤¬Àµ¤Î̵¸ÂÂç¤Ç¤Ê¤¤¾ì¹ç¡¢+0 (\-0) ¤¬ÊÖ¤µ¤ì¤ë¡£
141
142 .\"O If
143 .\"O .I x
144 .\"O is zero, and
145 .\"O .I exp
146 .\"O is positive infinity,
147 .\"O a domain error occurs, and
148 .\"O a NaN is returned.
149 .I x
150 ¤¬¥¼¥í¤Ç
151 .I exp
152 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢
153 NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
154
155 .\"O If
156 .\"O .I x
157 .\"O is an infinity,
158 .\"O and
159 .\"O .I exp
160 .\"O is negative infinity,
161 .\"O a domain error occurs, and
162 .\"O a NaN is returned.
163 .I x
164 ¤¬Ìµ¸ÂÂç¤Ç
165 .I exp
166 ¤¬Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢
167 NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
168
169 .\"O If the result overflows,
170 .\"O a range error occurs,
171 .\"O and the functions return
172 .\"O .BR HUGE_VAL ,
173 .\"O .BR HUGE_VALF ,
174 .\"O or
175 .\"O .BR HUGE_VALL ,
176 .\"O respectively, with a sign the same as
177 .\"O .IR x .
178 ·ë²Ì¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢
179 ÈÏ°Ï¥¨¥é¡¼ (range error) ¤¬È¯À¸¤·¡¢
180 ³Æ´Ø¿ô¤Ï¤½¤ì¤¾¤ì
181 .BR HUGE_VAL ,
182 .BR HUGE_VALF ,
183 .BR HUGE_VALL
184 ¤òÊÖ¤¹¡£Éä¹æ¤Ï
185 .I x
186 ¤ÈƱ¤¸¤Ë¤Ê¤ë¡£
187
188 .\"O If the result underflows,
189 .\"O a range error occurs,
190 .\"O and the functions return zero, with a sign the same as
191 .\"O .IR x .
192 ·ë²Ì¤¬¥¢¥ó¥À¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢ÈÏ°Ï¥¨¥é¡¼¤¬È¯À¸¤·¡¢
193 ³Æ´Ø¿ô¤Ï 0 ¤òÊÖ¤¹¡£Éä¹æ¤Ï
194 .I x
195 ¤ÈƱ¤¸¤Ë¤Ê¤ë¡£
196 .\"O .SH ERRORS
197 .SH ¥¨¥é¡¼
198 .\"O See
199 .\"O .BR math_error (7)
200 .\"O for information on how to determine whether an error has occurred
201 .\"O when calling these functions.
202 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
203 .BR math_error (7)
204 ¤ò»²¾È¤Î¤³¤È¡£
205 .PP
206 .\"O The following errors can occur:
207 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
208 .TP
209 .\"O Domain error: \fIx\fP is 0, and \fIexp\fP is positive infinity, \
210 .\"O or \fIx\fP is positive infinity and \fIexp\fP is negative infinity \
211 .\"O and the other argument is not a NaN
212 .\"Omotoki: °ú¤­¿ô¤Ï x, exp ¤ÎÆó¤Ä¤ÇξÊý¤È¤â¾ò·ï¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢
213 .\"Omotoki: Â¾¤Î°ú¤­¿ô¤Ë´Ø¤¹¤ëµ­½Ò¤Ï°ÕÌ£¤¬¤Ê¤¤¤È»×¤ï¤ì¤ë¡£ÏÂÌõ¤Ç¤Ï¾Êά¤¹¤ë¡£
214 Îΰ襨¥é¡¼ (domain error): \fIx\fP ¤¬ 0 ¤Ç \fIexp\fP ¤¬Àµ¤Î̵¸ÂÂç¡¢\
215 ¤Þ¤¿¤Ï \fIx\fP ¤¬Àµ¤Î̵¸ÂÂç¤Ç \fIexp\fP ¤¬Éé¤Î̵¸ÂÂç
216 .\" .I errno
217 .\" is set to
218 .\" .BR EDOM .
219 .\"O An invalid floating-point exception
220 .\"O .RB ( FE_INVALID )
221 .\"O is raised.
222 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
223 .RB ( FE_INVALID )
224 ¤¬¾å¤¬¤ë¡£
225 .TP
226 .\"O Range error, overflow
227 ÈÏ°Ï¥¨¥é¡¼ (range error)¡¢¥ª¡¼¥Ð¡¼¥Õ¥í¡¼
228 .\" .I errno
229 .\" is set to
230 .\" .BR ERANGE .
231 .\"O An overflow floating-point exception
232 .\"O .RB ( FE_OVERFLOW )
233 .\"O is raised.
234 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
235 .RB ( FE_OVERFLOW )
236 ¤¬¾å¤¬¤ë¡£
237 .TP
238 .\"O Range error, underflow
239 ÈÏ°Ï¥¨¥é¡¼ (range error)¡¢¥¢¥ó¥À¡¼¥Õ¥í¡¼
240 .\" .I errno
241 .\" is set to
242 .\" .BR ERANGE .
243 .\"O An underflow floating-point exception
244 .\"O .RB ( FE_UNDERFLOW )
245 .\"O is raised.
246 ¥¢¥ó¥À¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
247 .RB ( FE_UNDERFLOW )
248 ¤¬¾å¤¬¤ë¡£
249 .PP
250 .\"O These functions do not set
251 .\"O .IR errno .
252 ¤³¤ì¤é¤Î´Ø¿ô¤Ï
253 .I errno
254 ¤òÀßÄꤷ¤Ê¤¤¡£
255 .\" FIXME . Is it intentional that these functions do not set errno?
256 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6803
257 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6804
258 .\"O .SH "CONFORMING TO"
259 .SH ½àµò
260 .\"O .BR scalb ()
261 .\"O is specified in POSIX.1-2001, but marked obsolescent.
262 .\"O POSIX.1-2008 removes the specification of
263 .\"O .BR scalb (),
264 .\"O recommending the use of
265 .\"O .BR scalbln (3),
266 .\"O .BR scalblnf (3),
267 .\"O or
268 .\"O .BR scalblnl (3)
269 .\"O instead.
270 .\"O The
271 .\"O .BR scalb ()
272 .\"O function is from 4.3BSD.
273 .BR scalb ()
274 ¤Ï POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¤¬¡¢ÇÑ»ßͽÄê¤È¤µ¤ì¤Æ¤¤¤ë¡£
275 POSIX.1-2008 ¤Ç¤Ï
276 .BR scalb ()
277 ¤Î»ÅÍͤϺï½ü¤µ¤ì¤Æ¤ª¤ê¡¢Âå¤ï¤ê¤Ë
278 .BR scalbln (3),
279 .BR scalblnf (3),
280 .BR scalblnl (3)
281 ¤Î»ÈÍѤ¬¿ä¾©¤µ¤ì¤Æ¤¤¤ë¡£
282 .BR scalb ()
283 ´Ø¿ô¤Ï 4.3BSD ¤ËͳÍ褹¤ë¡£
284
285 .\"O .BR scalbf ()
286 .\"O and
287 .\"O .BR scalbl ()
288 .\"O are unstandardized;
289 .\"O .BR scalbf ()
290 .\"O is nevertheless present on several other systems
291 .BR scalbf ()
292 ¤È
293 .BR scalbl ()
294 ¤Ïɸ½à²½¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
295 ¤½¤ì¤Ë¤â´Ø¤ï¤é¤º¡¢
296 .BR scalbf ()
297 ¤Ï¤¤¤¯¤Ä¤«¤Î¾¤Î¥·¥¹¥Æ¥à¤Ë¸ºß¤¹¤ë¡£
298 .\" Looking at header files: scalbf() is present on the
299 .\" BSDs, Tru64, HP-UX 11, Irix 6.5; scalbl() is on HP-UX 11 and Tru64.
300 .\"O .SH "SEE ALSO"
301 .SH ´ØÏ¢¹àÌÜ
302 .BR ldexp (3),
303 .BR scalbln (3)