OSDN Git Service

(split) Refine LDP man3/expm1.3.
[linuxjm/LDP_man-pages.git] / draft / man3 / expm1.3
1 .\" Copyright 1995 Jim Van Zandt <jrv@vanzandt.mv.com>
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 .\" Modified 2002-07-27 Walter Harms
26 .\"     (walter.harms@informatik.uni-oldenburg.de)
27 .\"
28 .\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
29 .\" Translated Mon May 18 1998 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
30 .\" Update Tue Sep 23 2003 by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
31 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
32 .\"
33 .TH EXPM1 3  2010-09-12 "" "Linux Programmer's Manual"
34 .\"O .SH NAME
35 .SH Ì¾Á°
36 .\"O expm1, expm1f, expm1l \- exponential minus 1
37 expm1, expm1f, expm1l \- °ú¤­¿ô¤Î»Ø¿ô¤«¤é 1 ¤ò°ú¤¤¤¿ÃÍ
38 .\"O .SH SYNOPSIS
39 .SH ½ñ¼°
40 .nf
41 .B #include <math.h>
42 .sp
43 .BI "double expm1(double " x );
44 .br
45 .BI "float expm1f(float " x );
46 .br
47 .BI "long double expm1l(long double " x );
48 .sp
49 .fi
50 .\"O Link with \fI\-lm\fP.
51 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
52 .sp
53 .in -4n
54 .\"O Feature Test Macro Requirements for glibc (see
55 .\"O .BR feature_test_macros (7)):
56 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
57 .RB ( feature_test_macros (7)
58 »²¾È):
59 .in
60 .sp
61 .ad l
62 .BR expm1 ():
63 .RS 4
64 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
65 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED || _ISOC99_SOURCE ||
66 _POSIX_C_SOURCE\ >=\ 200112L;
67 .br
68 or
69 .I cc\ -std=c99
70 .RE
71 .br
72 .BR expm1f (),
73 .BR expm1l ():
74 .RS 4
75 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
76 _POSIX_C_SOURCE\ >=\ 200112L;
77 .br
78 or
79 .I cc\ -std=c99
80 .RE
81 .ad b
82 .\"O .SH DESCRIPTION
83 .SH ÀâÌÀ
84 .\"O .I expm1(x)
85 .\"O returns a value equivalent to
86 .BI expm1( x )
87 ¤Ï°Ê²¼¤ÈÅù¤·¤¤ÃͤòÊÖ¤¹¡£
88 .nf
89
90     exp(x) \- 1
91
92 .fi
93 .\"O It is
94 .\"O computed in a way that is accurate even if the value of \fIx\fP is near
95 .\"O zero\(ema case where
96 .\"O .I "exp(x) \- 1"
97 .\"O would be inaccurate due to
98 .\"O subtraction of two numbers that are nearly equal.
99 .I "exp(x) \- 1"
100 ¤Î·×»»¤Ë¤Ï¡¢\fIx\fP ¤¬ 0 ¤Î¶á˵¤Ç°ú¤­»»»þ¤Î·åÍî¤Á¤Î¤¿¤á¤Ë
101 ÉÔÀµ³Î¤È¤Ê¤ë¤è¤¦¤Ê¾ì¹ç¤Ç¤âÀµ³Î¤ÊÃͤ¬·×»»¤Ç¤­¤ëÊýË¡¤¬ÍѤ¤¤é¤ì¤ë¡£
102 .\"O .SH RETURN VALUE
103 .SH ÊÖ¤êÃÍ
104 .\"O On success, these functions return
105 .\"O .IR "exp(x)\ \-\ 1" .
106 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï
107 .I "exp(x)\ \-\ 1"
108 ¤òÊÖ¤¹¡£
109
110 .\"O If
111 .\"O .I x
112 .\"O is a NaN,
113 .\"O a NaN is returned.
114 .I x
115 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
116
117 .\"O If
118 .\"O .I x
119 .\"O is +0 (\-0),
120 .\"O +0 (\-0) is returned.
121 .I x
122 ¤¬ +0 (\-0) ¤Î¾ì¹ç¡¢+0 (\-0) ¤¬ÊÖ¤µ¤ì¤ë¡£
123
124 .\"O If
125 .\"O .I x
126 .\"O is positive infinity, positive infinity is returned.
127 .I x
128 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢Àµ¤Î̵¸ÂÂ礬ÊÖ¤µ¤ì¤ë¡£
129
130 .\"O If
131 .\"O .I x
132 .\"O is negative infinity, \-1 is returned.
133 .I x
134 ¤¬Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢\-1 ¤¬ÊÖ¤µ¤ì¤ë¡£
135
136 .\"O If the result overflows, a range error occurs,
137 .\"O and the functions return
138 .\"O .RB - HUGE_VAL ,
139 .\"O .RB - HUGE_VALF ,
140 .\"O or
141 .\"O .RB - HUGE_VALL ,
142 .\"O respectively.
143 ·ë²Ì¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢ÈÏ°Ï¥¨¥é¡¼ (range error) ¤¬È¯À¸¤·¡¢
144 ³Æ´Ø¿ô¤Ï¤½¤ì¤¾¤ì
145 .RB - HUGE_VAL ,
146 .RB - HUGE_VALF ,
147 .RB - HUGE_VALL
148 ¤òÊÖ¤¹¡£
149 .\"O .SH ERRORS
150 .SH ¥¨¥é¡¼
151 .\"O See
152 .\"O .BR math_error (7)
153 .\"O for information on how to determine whether an error has occurred
154 .\"O when calling these functions.
155 ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿ºÝ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤«¤ÎȽÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤Ï
156 .BR math_error (7)
157 ¤ò»²¾È¤Î¤³¤È¡£
158 .PP
159 .\"O The following errors can occur:
160 °Ê²¼¤Î¥¨¥é¡¼¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
161 .TP
162 .\"O Range error, overflow
163 ÈÏ°Ï¥¨¥é¡¼ (range error)¡¢¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤Î¾ì¹ç
164 .\"O .I errno
165 .\"O is set to
166 .\"O .BR ERANGE
167 .\"O (but see BUGS).
168 .\"O An overflow floating-point exception
169 .\"O .RB ( FE_OVERFLOW )
170 .\"O is raised.
171 .I errno
172 ¤Ë
173 .B ERANGE
174 ¤¬ÀßÄꤵ¤ì¤ë (¡Ö¥Ð¥°¡×¤ÎÀá¤â»²¾È)¡£
175 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
176 .RB ( FE_OVERFLOW )
177 ¤¬¾å¤¬¤ë¡£
178 .PP
179 .\"
180 .\" POSIX.1 specifies an optional range error (underflow) if
181 .\" x is subnormal.  Glibc does not implement this.
182 .\"O .SH "CONFORMING TO"
183 .SH ½àµò
184 C99, POSIX.1-2001.
185 .\" BSD.
186 .\"O .SH BUGS
187 .SH ¥Ð¥°
188 .\"O For some large negative
189 .\"O .I x
190 .\"O values (where the function result approaches \-1),
191 .\"O .BR expm1 ()
192 .\"O raises a bogus underflow floating-point exception.
193 .I x
194 ¤¬Éé¤ÎÂ礭¤ÊÃͤξì¹ç (¤³¤Î¾ì¹ç¤Ë¤Ï´Ø¿ô¤Î·ë²Ì¤Ï \-1 ¤Ë¶áÉÕ¤¤¤Æ¤¤¤¯)¡¢
195 .BR expm1 ()
196 ¤Ï´Ö°ã¤Ã¤Æ¥¢¥ó¥À¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°¤ò¾å¤²¤ë¤³¤È¤¬¤¢¤ë¡£
197 .\" FIXME .
198 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6778
199
200 .\"O For some large positive
201 .\"O .I x
202 .\"O values,
203 .\"O .BR expm1 ()
204 .\"O raises a bogus invalid floating-point exception in addition to the expected
205 .\"O overflow exception, and returns a NaN instead of positive infinity.
206 .I x
207 ¤¬Àµ¤ÎÂ礭¤ÊÃͤξì¹ç¡¢
208 .BR expm1 ()
209 ¤Ï´üÂÔÄ̤ê¤Î¥ª¡¼¥Ð¡¼¥Õ¥í¡¼Îã³°¤À¤±¤Ç¤Ê¤¯
210 ´Ö°ã¤Ã¤ÆÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°¤ò¾å¤²¡¢
211 Àµ¤Î̵¸ÂÂç¤Ç¤Ï¤Ê¤¯ NaN ¤òÊÖ¤¹¤³¤È¤¬¤¢¤ë¡£
212 .\" FIXME .
213 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6814
214 .\" e.g., expm1(1e5) through expm1(1.00199970127e5),
215 .\" but not expm1(1.00199970128e5) and beyond.
216
217 .\"O Before version 2.11,
218 .\" It looks like the fix was in 2.11, or possibly 2.12.
219 .\" I have no test system for 2.11, but 2.12 passes.
220 .\" From the source (sysdeps/i386/fpu/s_expm1.S) it looks
221 .\" like the changes were in 2.11.
222 .\"O the glibc implementation did not set
223 .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6788
224 .\"O .I errno
225 .\"O to
226 .\"O .B ERANGE
227 .\"O when a range error occurred.
228 ¥Ð¡¼¥¸¥ç¥ó 2.11 ¤è¤êÁ°¤Î glibc ¤Î¼ÂÁõ¤Ç¤Ï¡¢
229 ÈÏ°Ï¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤Ë¡¢
230 .I errno
231 ¤Ë
232 .B ERANGE
233 ¤¬ÀßÄꤵ¤ì¤Ê¤«¤Ã¤¿¡£
234 .\"O .SH "SEE ALSO"
235 .SH ´ØÏ¢¹àÌÜ
236 .BR exp (3),
237 .BR log (3),
238 .BR log1p (3)