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 2010-09-20 "" "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 );
47 .\"O Link with \fI\-lm\fP.
48 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
51 .\"O Feature Test Macro Requirements for glibc (see
52 .\"O .BR feature_test_macros (7)):
53 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
54 .RB ( feature_test_macros (7)
61 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
62 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
68 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600
73 .\"O These functions multiply their first argument
81 ¤³¤ì¤é¤Î´Ø¿ô¤ÏºÇ½é¤Î°ú¤¿ô
89 ¤Ï¤ª¤½¤é¤¯ 2 ¤Ç¤¢¤ë)¡£¤Ä¤Þ¤ê¡¢°Ê²¼¤Î¼°¤ÎÃͤòÊÖ¤¹¡£
95 .\"O The definition of
97 .\"O can be obtained by including
102 ¤ò¥¤¥ó¥¯¥ë¡¼¥É¤¹¤ë¤³¤È¤ÇÆÀ¤é¤ì¤ë¡£
103 .\"O .\" not in /usr/include but in a gcc lib
104 .\" /usr/include ¤Ç¤Ï¤Ê¤¯¡¢gcc ¤Î lib ¤Ë¤¢¤ë¡£
105 .\"O .SH RETURN VALUE
107 .\"O On success, these functions return \fIx\fP * \fBFLT_RADIX\fP ** \fIexp\fP.
108 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï \fIx\fP * \fBFLT_RADIX\fP ** \fIexp\fP ¤òÊÖ¤¹¡£
114 .\"O is a NaN, a NaN is returned.
118 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
122 .\"O is positive infinity (negative infinity),
125 .\"O is not negative infinity,
126 .\"O positive infinity (negative infinity) is returned.
128 ¤¬Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤Ç
130 ¤¬Éé¤Î̵¸ÂÂç¤Ç¤Ê¤¤¾ì¹ç¡¢Àµ¤Î̵¸ÂÂç (Éé¤Î̵¸ÂÂç) ¤¬ÊÖ¤µ¤ì¤ë¡£
134 .\"O is +0 (\-0), and
136 .\"O is not positive infinity, +0 (\-0) is returned.
140 ¤¬Àµ¤Î̵¸ÂÂç¤Ç¤Ê¤¤¾ì¹ç¡¢+0 (\-0) ¤¬ÊÖ¤µ¤ì¤ë¡£
146 .\"O is positive infinity,
147 .\"O a domain error occurs, and
148 .\"O a NaN is returned.
152 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢
160 .\"O is negative infinity,
161 .\"O a domain error occurs, and
162 .\"O a NaN is returned.
166 ¤¬Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢
169 .\"O If the result overflows,
170 .\"O a range error occurs,
171 .\"O and the functions return
176 .\"O respectively, with a sign the same as
178 ·ë²Ì¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢
179 ÈÏ°Ï¥¨¥é¡¼ (range error) ¤¬È¯À¸¤·¡¢
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
192 ·ë²Ì¤¬¥¢¥ó¥À¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢ÈÏ°Ï¥¨¥é¡¼¤¬È¯À¸¤·¡¢
193 ³Æ´Ø¿ô¤Ï 0 ¤òÊÖ¤¹¡£Éä¹æ¤Ï
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 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
206 .\"O The following errors can occur:
207 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ¤¬¤¢¤ë¡£
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 ¤¬Éé¤Î̵¸ÂÂç
219 .\"O An invalid floating-point exception
220 .\"O .RB ( FE_INVALID )
222 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
226 .\"O Range error, overflow
227 ÈÏ°Ï¥¨¥é¡¼ (range error)¡¢¥ª¡¼¥Ð¡¼¥Õ¥í¡¼
231 .\"O An overflow floating-point exception
232 .\"O .RB ( FE_OVERFLOW )
234 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
238 .\"O Range error, underflow
239 ÈÏ°Ï¥¨¥é¡¼ (range error)¡¢¥¢¥ó¥À¡¼¥Õ¥í¡¼
243 .\"O An underflow floating-point exception
244 .\"O .RB ( FE_UNDERFLOW )
246 ¥¢¥ó¥À¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
250 .\"O These functions do not set
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"
261 .\"O is specified in POSIX.1-2001, but marked obsolescent.
262 .\"O POSIX.1-2008 removes the specification of
264 .\"O recommending the use of
265 .\"O .BR scalbln (3),
266 .\"O .BR scalblnf (3),
268 .\"O .BR scalblnl (3)
272 .\"O function is from 4.3BSD.
274 ¤Ï POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¤¬¡¢ÇÑ»ßͽÄê¤È¤µ¤ì¤Æ¤¤¤ë¡£
277 ¤Î»ÅÍͤϺï½ü¤µ¤ì¤Æ¤ª¤ê¡¢Âå¤ï¤ê¤Ë
281 ¤Î»ÈÍѤ¬¿ä¾©¤µ¤ì¤Æ¤¤¤ë¡£
283 ´Ø¿ô¤Ï 4.3BSD ¤ËͳÍ褹¤ë¡£
288 .\"O are unstandardized;
290 .\"O is nevertheless present on several other systems
294 ¤Ïɸ½à²½¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
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.