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>
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 .\" References consulted:
26 .\" Linux libc source code
27 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
29 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
30 .\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no>
31 .\" Modified 2002-07-27 by Walter Harms
32 .\" (walter.harms@informatik.uni-oldenburg.de)
34 .\" Japanese Version Copyright (c) 2003, 2008 Akihiro MOTOKI
35 .\" all rights reserved.
36 .\" Translated Mon Sep 7 23:27:52 JST 2003
37 .\" by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
38 .\" Updated 2008-09-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
40 .TH POW 3 2010-09-12 "" "Linux Programmer's Manual"
42 pow, powf, powl \- Îß¾è´Ø¿ô
47 .BI "double pow(double " x ", double " y );
49 .BI "float powf(float " x ", float " y );
51 .BI "long double powl(long double " x ", long double " y );
54 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
57 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
58 .RB ( feature_test_macros (7)
66 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
67 _POSIX_C_SOURCE\ >=\ 200112L;
75 ´Ø¿ô¤Ï \fIx\fP ¤Î \fIy\fP ¾è¤ÎÃͤòÊÖ¤¹¡£
77 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
86 ¤¬À°¿ô¤Ç¤Ê¤¤Í¸ÂÃͤξì¹ç¡¢Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢
87 .\" The domain error is generated at least as far back as glibc 2.4
90 ·ë²Ì¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢
91 ÈÏ°Ï¥¨¥é¡¼ (range error) ¤¬È¯À¸¤·¡¢
92 .\" The range error is generated at least as far back as glibc 2.4
97 ¤òÊÖ¤¹¡£ÊÖ¤êÃͤˤϿô³ØŪ¤ËÀµ¤·¤¤Éä¹æ¤¬ÉÕÍ¿¤µ¤ì¤ë¡£
99 ·ë²Ì¤¬¥¢¥ó¥À¡¼¥Õ¥í¡¼¤·¡¢¤½¤ÎÃͤ¬É½¸½²Äǽ¤Ç¤Ê¤¤¾ì¹ç¡¢
100 ÈÏ°Ï¥¨¥é¡¼¤¬È¯À¸¤·¡¢ 0.0 ¤¬ÊÖ¤µ¤ì¤ë¡£
101 .\" POSIX.1 does not specify the sign of the zero,
102 .\" but http://sources.redhat.com/bugzilla/show_bug.cgi?id=2678
103 .\" points out that the zero has the wrong sign in some cases.
105 °Ê²¼¤Çµ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ç¡¢
109 ¤¬ NaN ¤Î¾ì¹ç¡¢ÊÖ¤êÃÍ¤Ï NaN ¤È¤Ê¤ë¡£
114 ¤¬ NaN ¤Ç¤¢¤Ã¤¿¤È¤·¤Æ¤â) ÊÖ¤êÃÍ¤Ï 1.0 ¤È¤Ê¤ë¡£
119 ¤¬ NaN ¤Ç¤¢¤Ã¤¿¤È¤·¤Æ¤â) ÊÖ¤êÃÍ¤Ï 1.0 ¤È¤Ê¤ë¡£
124 ¤¬ 0 ¤è¤êÂ礤ʴñ¿ô¤Î¾ì¹ç¡¢ÊÖ¤êÃÍ¤Ï +0 (\-0) ¤È¤Ê¤ë¡£
129 ¤¬ 0 ¤è¤êÂ礤¯´ñ¿ô¤Ç¤Ê¤¤¾ì¹ç¡¢ÊÖ¤êÃÍ¤Ï +0 ¤È¤Ê¤ë¡£
134 ¤¬Àµ¤Î̵¸ÂÂ礫Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢ÊÖ¤êÃÍ¤Ï 1.0 ¤È¤Ê¤ë¡£
137 ¤ÎÀäÂÐÃͤ¬ 1 ̤Ëþ¤Ç¡¢
139 ¤¬Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢ÊÖ¤êÃͤÏÀµ¤Î̵¸ÂÂç¤È¤Ê¤ë¡£
142 ÀäÂÐÃͤ¬ 1 ¤è¤êÂ礤¯¡¢
144 ¤¬Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢ÊÖ¤êÃÍ¤Ï +0 ¤È¤Ê¤ë¡£
147 ¤ÎÀäÂÐÃͤ¬ 1 ̤Ëþ¤Ç¡¢
149 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢ÊÖ¤êÃÍ¤Ï +0 ¤È¤Ê¤ë¡£
152 ¤ÎÀäÂÐÃͤ¬ 1 ¤è¤êÂ礤¯¡¢
154 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢ÊÖ¤êÃͤÏÀµ¤Î̵¸ÂÂç¤È¤Ê¤ë¡£
159 ¤¬ 0 ¤è¤ê¾®¤µ¤¤´ñ¿ô¤Î¾ì¹ç¡¢ÊÖ¤êÃÍ¤Ï \-0 ¤È¤Ê¤ë¡£
164 ¤¬ 0 ¤è¤ê¾®¤µ¤¯´ñ¿ô¤Ç¤Ê¤¤¾ì¹ç¡¢ÊÖ¤êÃÍ¤Ï +0 ¤È¤Ê¤ë¡£
169 ¤¬ 0 ¤è¤êÂ礤¤´ñ¿ô¤Î¾ì¹ç¡¢ÊÖ¤êÃͤÏÉé¤Î̵¸ÂÂç¤È¤Ê¤ë¡£
174 ¤¬ 0 ¤è¤êÂ礤¯´ñ¿ô¤Ç¤Ê¤¤¾ì¹ç¡¢ÊÖ¤êÃͤÏÀµ¤Î̵¸ÂÂç¤È¤Ê¤ë¡£
179 ¤¬ 0 ̤Ëþ¤Î¾ì¹ç¡¢ÊÖ¤êÃÍ¤Ï +0 ¤È¤Ê¤ë¡£
184 ¤¬ 0 ¤è¤êÂ礤¤¾ì¹ç¡¢ÊÖ¤êÃͤÏÀµ¤Î̵¸ÂÂç¤È¤Ê¤ë¡£
189 ¤¬ 0 ¤è¤ê¾®¤µ¤¤´ñ¿ô¤Î¾ì¹ç¡¢
190 ¶Ë¥¨¥é¡¼ (pole error) ¤¬È¯À¸¤·¡¢ÊÖ¤êÃͤÏ
196 ¤ÈƱ¤¸Éä¹æ¤¬ÉÕÍ¿¤µ¤ì¤ë¡£
201 ¤¬ 0 ¤è¤ê¾®¤µ¤¯´ñ¿ô¤Ç¤Ê¤¤¾ì¹ç¡¢
203 .\" The pole error is generated at least as far back as glibc 2.4
210 .\" FIXME . review status of this error
211 .\" longstanding bug report for glibc:
212 .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=369
213 .\" For negative x, and -large and +large y, glibc 2.8 gives incorrect
215 .\" pow(-0.5,-DBL_MAX)=nan
216 .\" EDOM FE_INVALID nan; fail-errno fail-except fail-result;
217 .\" FAIL (expected: range-error-overflow (ERANGE, FE_OVERFLOW); +INF)
219 .\" pow(-1.5,-DBL_MAX)=nan
220 .\" EDOM FE_INVALID nan; fail-errno fail-except fail-result;
221 .\" FAIL (expected: range-error-underflow (ERANGE, FE_UNDERFLOW); +0)
223 .\" pow(-0.5,DBL_MAX)=nan
224 .\" EDOM FE_INVALID nan; fail-errno fail-except fail-result;
225 .\" FAIL (expected: range-error-underflow (ERANGE, FE_UNDERFLOW); +0)
227 .\" pow(-1.5,DBL_MAX)=nan
228 .\" EDOM FE_INVALID nan; fail-errno fail-except fail-result;
229 .\" FAIL (expected: range-error-overflow (ERANGE, FE_OVERFLOW); +INF)
230 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
234 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ¤¬¤¢¤ë¡£
236 Îΰ襨¥é¡¼: \fIx\fP ¤¬Éé¤Ç¡¢\fIy\fP ¤¬À°¿ô¤Ç¤Ê¤¤Í¸ÂÃÍ
241 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
245 ¶Ë¥¨¥é¡¼: \fIx\fP ¤¬¥¼¥í¤Ç¡¢\fIy\fP ¤¬Éé
250 0 ¤Ë¤è¤ë½ü»» (divide-by-zero) ÉâÆ°¾®¿ôÅÀÎã³°
254 ÈÏ°Ï¥¨¥é¡¼: ·ë²Ì¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼
259 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
263 ÈÏ°Ï¥¨¥é¡¼: ·ë²Ì¤¬¥¢¥ó¥À¡¼¥Õ¥í¡¼
268 ¥¢¥ó¥À¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
274 ÈǤδؿô¤Ï SVr4, 4.3BSD, C89 ¤Ë¤â½àµò¤·¤Æ¤¤¤ë¡£
277 .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6776
278 .\" or possibly 2.9, I haven't found the source code change
279 .\" and I don't have a 2.9 system to test
280 glibc 2.9 ¤È¤½¤ì°ÊÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¢
281 ¶Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¡¢POSIX ¤ÇÍ׵ᤵ¤ì¤Æ¤¤¤ë
288 ¥Ð¡¼¥¸¥ç¥ó 2.10 °Ê¹ß¤Î glibc ¤Ç¤Ï¡¢Àµ¤·¤¤Æ°ºî¤ò¤¹¤ë¡£
291 ¤¬Éé¤Î¾ì¹ç¡¢Â礤ÊÀµÉé¤ÎÃͤÎ
293 ¤¬Í¿¤¨¤é¤ì¤ë¤È¡¢´Ø¿ô¤Î·ë²Ì¤¬ NaN ¤È¤Ê¤ê¡¢
305 ¤ÎÀäÂÐÃͤ¬Ìó 9.223373e18 ¤è¤êÂ礤¤¾ì¹ç¤Ë¤³¤Î¾õ¶·¤È¤Ê¤ë¡£
306 .\" see bug http://sources.redhat.com/bugzilla/show_bug.cgi?id=3866
307 .\" and http://sources.redhat.com/bugzilla/show_bug.cgi?id=369
309 glibc ¥Ð¡¼¥¸¥ç¥ó 2.3.2 °ÊÁ°¤Ç¤Ï¡¢
310 .\" FIXME . Actually, 2.3.2 is the earliest test result I have; so yet
311 .\" to confirm if this error occurs only in 2.3.2.
312 ¥¢¥ó¥À¡¼¥Õ¥í¡¼¤ä¥¢¥ó¥À¡¼¥Õ¥í¡¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë¾ì¹ç¡¢
315 ¤Ï¡¢¥ª¡¼¥Ð¡¼¥Õ¥í¡¼Îã³°¤ä¥¢¥ó¥À¡¼¥Õ¥í¡¼Îã³°¤ò¾å¤²¤ë¤À¤±¤Ç¤Ê¤¯¡¢