1 .\" Copyright 2004 Andries Brouwer <aeb@cwi.nl>.
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
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.
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.
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
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
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>
31 .TH SCALB 3 2009-03-15 "" "Linux Programmer's Manual"
34 .\"O scalb, scalbf, scalbl \- multiply floating-point number
35 .\"O by integral power of radix (OBSOLETE)
36 scalb, scalbf, scalbl \- ÉâÆ°¾®¿ôÅÀ¿ô¤ËÀ°¿ô¤Ç¤¢¤ë´ð¿ô¤ÎÎß¾è¤ò³Ý¤±¤ë (ÇÑ»ßͽÄê)
41 .BI "double scalb(double " x ", double " exp );
43 .BI "float scalbf(float " x ", double " exp );
45 .BI "long double scalbl(long double " x ", double " exp );
48 .\"O Feature Test Macro Requirements for glibc (see
49 .\"O .BR feature_test_macros (7)):
50 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
51 .RB ( feature_test_macros (7)
57 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500
61 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600
63 .\"O Link with \fI\-lm\fP.
64 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
67 .\"O These functions multiply their first argument
75 ¤³¤ì¤é¤Î´Ø¿ô¤ÏºÇ½é¤Î°ú¤¿ô
83 ¤Ï¤ª¤½¤é¤¯ 2 ¤Ç¤¢¤ë)¡£¤Ä¤Þ¤ê¡¢°Ê²¼¤Î¼°¤ÎÃͤòÊÖ¤¹¡£
89 .\"O The definition of
91 .\"O can be obtained by including
96 ¤ò¥¤¥ó¥¯¥ë¡¼¥É¤¹¤ë¤³¤È¤ÇÆÀ¤é¤ì¤ë¡£
97 .\"O .\" not in /usr/include but in a gcc lib
98 .\" /usr/include ¤Ç¤Ï¤Ê¤¯¡¢gcc ¤Î lib ¤Ë¤¢¤ë¡£
101 .\"O On success, these functions return \fIx\fP * \fBFLT_RADIX\fP ** \fIexp\fP.
102 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï \fIx\fP * \fBFLT_RADIX\fP ** \fIexp\fP ¤òÊÖ¤¹¡£
108 .\"O is a NaN, a NaN is returned.
112 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
116 .\"O is positive infinity (negative infinity),
119 .\"O is not negative infinity,
120 .\"O positive infinity (negative infinity) is returned.
122 ¤¬Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤Ç
124 ¤¬Éé¤Î̵¸ÂÂç¤Ç¤Ê¤¤¾ì¹ç¡¢Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤¬ÊÖ¤µ¤ì¤ë¡£
128 .\"O is +0 (\-0), and
130 .\"O is not positive infinity, +0 (\-0) is returned.
134 ¤¬Àµ¤Î̵¸ÂÂç¤Ç¤Ê¤¤¾ì¹ç¡¢+0 (\-0) ¤¬ÊÖ¤µ¤ì¤ë¡£
140 .\"O is positive infinity,
141 .\"O a domain error occurs, and
142 .\"O a NaN is returned.
146 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢
154 .\"O is negative infinity,
155 .\"O a domain error occurs, and
156 .\"O a NaN is returned.
160 ¤¬Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢
163 .\"O If the result overflows,
164 .\"O a range error occurs,
165 .\"O and the functions return
170 .\"O respectively, with a sign the same as
172 ·ë²Ì¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢
173 ÈÏ°Ï¥¨¥é¡¼ (range error) ¤¬È¯À¸¤·¡¢
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
186 ·ë²Ì¤¬¥¢¥ó¥À¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢ÈÏ°Ï¥¨¥é¡¼¤¬È¯À¸¤·¡¢
187 ³Æ´Ø¿ô¤Ï 0 ¤òÊÖ¤¹¡£Éä¹æ¤Ï
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 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
200 .\"O The following errors can occur:
201 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ¤¬¤¢¤ë¡£
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 ¤¬Éé¤Î̵¸ÂÂç
213 .\"O An invalid floating-point exception
214 .\"O .RB ( FE_INVALID )
216 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
220 .\"O Range error, overflow
221 ÈÏ°Ï¥¨¥é¡¼ (range error)¡¢¥ª¡¼¥Ð¡¼¥Õ¥í¡¼
225 .\"O An overflow floating-point exception
226 .\"O .RB ( FE_OVERFLOW )
228 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
232 .\"O Range error, underflow
233 ÈÏ°Ï¥¨¥é¡¼ (range error)¡¢¥¢¥ó¥À¡¼¥Õ¥í¡¼
237 .\"O An underflow floating-point exception
238 .\"O .RB ( FE_UNDERFLOW )
240 ¥¢¥ó¥À¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
244 .\"O These functions do not set
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"
255 .\"O is specified in POSIX.1-2001, but marked obsolescent.
256 .\"O POSIX.1-2008 removes the specification of
258 .\"O recommending the use of
259 .\"O .BR scalbln (3),
260 .\"O .BR scalblnf (3),
262 .\"O .BR scalblnl (3)
266 .\"O function is from 4.3BSD.
268 ¤Ï POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¤¬¡¢ÇÑ»ßͽÄê¤È¤µ¤ì¤Æ¤¤¤ë¡£
271 ¤Î»ÅÍͤϺï½ü¤µ¤ì¤Æ¤ª¤ê¡¢Âå¤ï¤ê¤Ë
275 ¤Î»ÈÍѤ¬¿ä¾©¤µ¤ì¤Æ¤¤¤ë¡£
277 ´Ø¿ô¤Ï 4.3BSD ¤ËͳÍ褹¤ë¡£
282 .\"O are unstandardized;
284 .\"O is nevertheless present on several other systems
288 ¤Ïɸ½à²½¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
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.