OSDN Git Service

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