OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / tgamma.3
1 .\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\" Distributed under GPL
3 .\" Based on glibc infopages
4 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
5 .\"     <mtk.manpages@gmail.com>
6 .\" Modified 2004-11-15, fixed error noted by Fabian Kreutz
7 .\"      <kreutz@dbs.uni-hannover.de>
8 .\"
9 .\" Japanese Version Copyright (c) 2002 Akihiro MOTOKI
10 .\"         all rights reserved.
11 .\" Translated Sun Sep 22 09:31:52 2002
12 .\"         by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
13 .\" Updated & Modified Sat Feb 12 12:00:00 2005
14 .\"         by SAITOH Akira <s-akira@users.sourceforge.net>
15 .\" Updated 2008-09-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
16 .\"
17 .TH TGAMMA 3 2008-08-11 "GNU" "Linux Programmer's Manual"
18 .\"O .SH NAME
19 .SH Ì¾Á°
20 .\"O tgamma, tgammaf, tgammal \- true gamma function
21 tgamma, tgammaf, tgammal \- ËÜÅö¤Î¥¬¥ó¥Þ´Ø¿ô
22 .\"O .SH SYNOPSIS
23 .SH ½ñ¼°
24 .B #include <math.h>
25 .sp
26 .BI "double tgamma(double " x );
27 .br
28 .BI "float tgammaf(float " x );
29 .br
30 .BI "long double tgammal(long double " x );
31 .sp
32 .\"O Link with \fI\-lm\fP.
33 \fI\-lm\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
34 .sp
35 .in -4n
36 Feature Test Macro Requirements for glibc (see
37 .BR feature_test_macros (7)):
38 .in
39 .sp
40 .ad l
41 .BR tgamma (),
42 .BR tgammaf (),
43 .BR tgammal ():
44 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
45 .I cc\ -std=c99
46 .ad b
47 .\"O .SH DESCRIPTION
48 .SH ÀâÌÀ
49 .\"O The Gamma function is defined by
50 .\"O .sp
51 .\"O     Gamma(x) = integral from 0 to infinity of t^(x\-1) e^\-t dt
52 .\"O .sp
53 .\"O It is defined for every real number except for nonpositive integers.
54 ¥¬¥ó¥Þ´Ø¿ô¤Ï°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤ë:
55 .sp
56      Gamma(x) = t^(x\-1) e^\-t dt ¤Î 0 ¤«¤é̵¸ÂÂç¤Þ¤Ç¤ÎÀÑʬ
57 .sp
58 ¤³¤Î´Ø¿ô¤ÏÀµ¤Ç¤Ê¤¤À°¿ô¤ò½ü¤¯¤¹¤Ù¤Æ¤Î¼Â¿ô¤ËÂФ·¤ÆÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
59 .\"O For nonnegative integral \fIm\fP one has
60 .\"O .sp
61 .\"O     Gamma(m+1) = m!
62 .\"O .sp
63 .\"O and, more generally, for all \fIx\fP:
64 .\"O .sp
65 .\"O     Gamma(x+1) = x * Gamma(x)
66 .\"O .sp
67 .\"O Furthermore, the following is valid for all values of \fIx\fP
68 .\"O outside the poles:
69 .\"O .sp
70 .\"O     Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x)
71 .\"O .PP
72 ÈóÉé¤ÎÀ°¿ô \fIm\fP ¤Ë´Ø¤·¤Æ¡¢°Ê²¼¤¬À®Î©¤¹¤ë:
73 .sp
74     Gamma(m+1) = m!
75 .sp
76 ¤è¤ê°ìÈÌŪ¤Ë¤Ï¡¢¤¹¤Ù¤Æ¤Î \fIx\fP ¤Ë´Ø¤·¤Æ°Ê²¼¤¬À®Î©¤¹¤ë:
77 .sp
78     Gamma(x+1) = x * Gamma(x)
79 .sp
80 ¤µ¤é¤Ë¡¢¶Ë¤ò½ü¤¯¤¹¤Ù¤Æ¤Î \fIx\fP ¤Ç¼¡¼°¤âÀ®Î©¤¹¤ë:
81 .sp
82     Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x)
83 .PP
84 .\"O .SH RETURN VALUE
85 .SH ÊÖ¤êÃÍ
86 .\"O On success, these functions return Gamma(x).
87 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï Gamma(x) ¤òÊÖ¤¹¡£
88
89 .\"O If
90 .\"O .I x
91 .\"O is a NaN, a NaN is returned.
92 .I x
93 ¤¬ NaN ¤Î¾ì¹ç¡¢NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
94
95 .\"O If
96 .\"O .I x
97 .\"O is positive infinity, positive infinity is returned.
98 .I x
99 ¤¬Àµ¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢Àµ¤Î̵¸ÂÂ礬ÊÖ¤µ¤ì¤ë¡£
100
101 .\"O If
102 .\"O .I x
103 .\"O is a negative integer, or is negative infinity,
104 .\"O a domain error occurs,
105 .\"O and a NaN is returned.
106 .I x
107 ¤¬Éé¤ÎÀ°¿ô¤«Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢Îΰ襨¥é¡¼ (domain error) ¤¬È¯À¸¤·¡¢
108 NaN ¤¬ÊÖ¤µ¤ì¤ë¡£
109
110 .\"O If the result overflows,
111 .\"O a range error occurs,
112 .\"O and the functions return
113 .\"O .BR HUGE_VAL ,
114 .\"O .BR HUGE_VALF ,
115 .\"O or
116 .\"O .BR HUGE_VALL ,
117 .\"O respectively, with the correct mathematical sign.
118 ·ë²Ì¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢ÈÏ°Ï¥¨¥é¡¼ (range error) ¤¬È¯À¸¤·¡¢
119 ³Æ´Ø¿ô¤Ï¤½¤ì¤¾¤ì
120 .BR HUGE_VAL ,
121 .BR HUGE_VALF ,
122 .BR HUGE_VALL ,
123 ¤òÊÖ¤¹¡£¤³¤ÎºÝ¡¢¿ô³ØŪ¤ËÀµ¤·¤¤Éä¹æ¤¬ÉÕÍ¿¤µ¤ì¤ë¡£
124
125 .\"O If the result underflows,
126 .\"O a range error occurs,
127 .\"O and the functions return 0, with the correct mathematical sign.
128 ·ë²Ì¤¬¥¢¥ó¥À¡¼¥Õ¥í¡¼¤¹¤ë¾ì¹ç¡¢ÈÏ°Ï¥¨¥é¡¼ (range error) ¤¬È¯À¸¤·¡¢
129 ´Ø¿ô¤Ï 0 ¤ò¤òÊÖ¤¹¡£¤³¤ÎºÝ¡¢¿ô³ØŪ¤ËÀµ¤·¤¤Éä¹æ¤¬ÉÕÍ¿¤µ¤ì¤ë¡£
130
131 .\"O If
132 .\"O .I x
133 .\"O is -0 or +0,
134 .\"O a pole error occurs,
135 .\"O and the functions return
136 .\"O .BR HUGE_VAL ,
137 .\"O .BR HUGE_VALF ,
138 .\"O or
139 .\"O .BR HUGE_VALL ,
140 .\"O respectively, with the same sign as the 0.
141 .I x
142 ¤¬ \-0 ¤« +0 ¤Î¾ì¹ç¡¢¶Ë¥¨¥é¡¼ (pole error) ¤¬È¯À¸¤·¡¢
143 ³Æ´Ø¿ô¤Ï¤½¤ì¤¾¤ì
144 .BR HUGE_VAL ,
145 .BR HUGE_VALF ,
146 .BR HUGE_VALL ,
147 ¤òÊÖ¤¹¡£
148 0 ¤ÈƱ¤¸Éä¹æ¤¬ÉÕÍ¿¤µ¤ì¤ë¡£
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 Domain error: \fIx\fP is a negative integer, or negative infinity
163 Îΰ襨¥é¡¼: \fIx\fP ¤¬Éé¤ÎÀ°¿ô¤«Éé¤Î̵¸ÂÂç
164 .\" FIXME . errno is not set to EDOM for x == -inf
165 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6809
166 .\"O .I errno
167 .\"O is set to
168 .\"O .BR EDOM .
169 .\"O An invalid floating-point exception
170 .\"O .RB ( FE_INVALID )
171 .\"O is raised (but see BUGS).
172 .I errno
173 ¤Ë
174 .B EDOM
175 ¤¬ÀßÄꤵ¤ì¤ë¡£
176 ÉÔÀµ (invalid) ÉâÆ°¾®¿ôÅÀÎã³°
177 .RB ( FE_INVALID )
178 ¤¬¾å¤¬¤ë (¡Ö¥Ð¥°¡×¤ÎÀá¤ò»²¾È)¡£
179 .TP
180 .\"O Pole error: \fIx\fP is +0 or \-0
181 ¶Ë¥¨¥é¡¼ (pole error): \fIx\fP ¤¬ +0 ¤« \-0
182 .\"O .I errno
183 .\"O is set to
184 .\"O .BR ERANGE .
185 .\"O A divide-by-zero floating-point exception
186 .\"O .RB ( FE_DIVBYZERO )
187 .\"O is raised.
188 .I errno
189 ¤Ë
190 .B ERANGE
191 ¤¬ÀßÄꤵ¤ì¤ë¡£
192 0 ¤Ë¤è¤ë½ü»» (divide-by-zero) ÉâÆ°¾®¿ôÅÀÎã³°
193 .RB ( FE_DIVBYZERO )
194 ¤¬¾å¤¬¤ë¡£
195 .TP
196 .\"O Range error: result overflow
197 ÈÏ°Ï¥¨¥é¡¼ (range error): ·ë²Ì¤Î¥ª¡¼¥Ð¡¼¥Õ¥í¡¼
198 .\"O .I errno
199 .\"O is set to
200 .\"O .BR ERANGE .
201 .\"O An overflow floating-point exception
202 .\"O .RB ( FE_OVERFLOW )
203 .\"O is raised.
204 .I errno
205 ¤Ë
206 .B ERANGE
207 ¤¬ÀßÄꤵ¤ì¤ë¡£
208 ¥ª¡¼¥Ð¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
209 .RB ( FE_OVERFLOW )
210 ¤¬¾å¤¬¤ë¡£
211 .PP
212 .\"O glibc also gives the following error which is not specified
213 .\"O in C99 or POSIX.1-2001.
214 glibc ¤Ç¤Ï¡¢C99 ¤ä POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤°Ê²¼¤Î¥¨¥é¡¼¤â
215 µ¯¤³¤êÆÀ¤ë¡£
216 .TP
217 .\"O Range error: result underflow
218 ÈÏ°Ï¥¨¥é¡¼ (range error): ·ë²Ì¤Î¥¢¥ó¥À¡¼¥Õ¥í¡¼
219 .\" e.g., tgamma(-172.5) on glibc 2.8/x86-32
220 .\" .I errno
221 .\" is set to
222 .\" .BR ERANGE .
223 .\"O An underflow floating-point exception
224 .\"O .RB ( FE_UNDERFLOW )
225 .\"O is raised.
226 .\"O .IP
227 .\"O .I errno
228 .\"O is not set for this case.
229 ¥¢¥ó¥À¡¼¥Õ¥í¡¼ÉâÆ°¾®¿ôÅÀÎã³°
230 .RB ( FE_UNDERFLOW )
231 ¤¬¾å¤¬¤ë¡£
232 ¤³¤Î¾ì¹ç¤Ï
233 .I errno
234 ¤ÏÀßÄꤵ¤ì¤Ê¤¤¡£
235 .\" FIXME . Is it intentional that errno is not set:
236 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6810
237 .\"
238 .\" glibc (as at 2.8) also supports and an inexact
239 .\" exception for various cases.
240 .\"O .SH VERSIONS
241 .SH ¥Ð¡¼¥¸¥ç¥ó
242 .\"O These functions first appeared in glibc in version 2.1.
243 ¤³¤ì¤é¤Î´Ø¿ô¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.1 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
244 .\"O .SH "CONFORMING TO"
245 .SH ½àµò
246 C99, POSIX.1-2001.
247 .\"O .SH NOTES
248 .SH Ãí°Õ
249 .\"O This function had to be called "true gamma function"
250 .\"O since there is already a function
251 .\"O .BR gamma (3)
252 .\"O that returns something else (see
253 .\"O .BR gamma (3)
254 .\"O for details).
255 ¤³¤Î´Ø¿ô¤ò¡ÖËÜÅö¤Î (true) ¥¬¥ó¥Þ´Ø¿ô¡×¤È¸Æ¤Ð¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤«¤Ã¤¿¡£
256 ¤Ê¤¼¤Ê¤é¡¢Â¾¤ÎÃͤòÊÖ¤¹
257 .BR gamma (3)
258 ¤È¤¤¤¦´Ø¿ô¤¬¤¹¤Ç¤Ë¸ºß¤¹¤ë¤«¤é¤Ç¤¢¤ë (¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï
259 .BR gamma (3)
260 ¤ò»²¾È)¡£
261 .\"O .SH BUGS
262 .SH ¥Ð¥°
263 .\"O If
264 .\"O .I x
265 .\"O is negative infinity,
266 .\"O .I errno
267 .\"O is not set (it should be set to
268 .\"O .BR EDOM ).
269 .I x
270 ¤¬Éé¤Î̵¸ÂÂç¤Î¾ì¹ç¡¢
271 .I errno
272 ¤ÏÀßÄꤵ¤ì¤Ê¤¤
273 .RB ( EDOM
274 ¤¬ÀßÄꤵ¤ì¤ë¤Ù¤­¤Ç¤¢¤ë)¡£
275 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6809
276
277 .\"O In glibc versions 2.3.3 and earlier,
278 .\"O an argument of +0 or -0 incorrectly produced a domain error
279 .\"O .RI ( errno
280 .\"O set to
281 .\"O .B EDOM
282 .\"O and an
283 .\"O .B FE_INVALID
284 .\"O exception raised), rather than a pole error.
285 glibc ¥Ð¡¼¥¸¥ç¥ó 2.3.3 °ÊÁ°¤Ç¤Ï¡¢
286 °ú¤­¿ô¤Ë +0 ¤ä \-0 ¤òÅϤ¹¤È¡¢¶Ë¥¨¥é¡¼¤Ç¤Ï¤Ê¤¯¡¢
287 Îΰ襨¥é¡¼¤ò´Ö°ã¤Ã¤ÆȯÀ¸¤·¤Æ¤¤¤¿
288 (Îΰ襨¥é¡¼¤Î¾ì¹ç¡¢
289 .I errno
290 ¤Ë
291 .B EDOM
292 ¤òÀßÄꤵ¤ì¡¢
293 .B FE_INVALID
294 Îã³°¤¬È¯À¸¤¹¤ë)¡£
295 .\"O .SH "SEE ALSO"
296 .SH ´ØÏ¢¹àÌÜ
297 .BR gamma (3),
298 .BR lgamma (3)