OSDN Git Service

Convert release and draft pages to UTF-8.
[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 2010-09-20 "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 .\"O Feature Test Macro Requirements for glibc (see
37 .\"O .BR feature_test_macros (7)):
38 glibc 向けの機能検査マクロの要件
39 .RB ( feature_test_macros (7)
40 参照):
41 .in
42 .sp
43 .ad l
44 .BR tgamma (),
45 .BR tgammaf (),
46 .BR tgammal ():
47 .RS 4
48 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
49 _POSIX_C_SOURCE\ >=\ 200112L;
50 .br
51 or
52 .I cc\ -std=c99
53 .RE
54 .ad
55 .\"O .SH DESCRIPTION
56 .SH 説明
57 .\"O The Gamma function is defined by
58 .\"O .sp
59 .\"O     Gamma(x) = integral from 0 to infinity of t^(x\-1) e^\-t dt
60 .\"O .sp
61 .\"O It is defined for every real number except for nonpositive integers.
62 ガンマ関数は以下のように定義される:
63 .sp
64      Gamma(x) = t^(x\-1) e^\-t dt の 0 から無限大までの積分
65 .sp
66 この関数は正でない整数を除くすべての実数に対して定義されている。
67 .\"O For nonnegative integral \fIm\fP one has
68 .\"O .sp
69 .\"O     Gamma(m+1) = m!
70 .\"O .sp
71 .\"O and, more generally, for all \fIx\fP:
72 .\"O .sp
73 .\"O     Gamma(x+1) = x * Gamma(x)
74 .\"O .sp
75 .\"O Furthermore, the following is valid for all values of \fIx\fP
76 .\"O outside the poles:
77 .\"O .sp
78 .\"O     Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x)
79 .\"O .PP
80 非負の整数 \fIm\fP に関して、以下が成立する:
81 .sp
82     Gamma(m+1) = m!
83 .sp
84 より一般的には、すべての \fIx\fP に関して以下が成立する:
85 .sp
86     Gamma(x+1) = x * Gamma(x)
87 .sp
88 さらに、極を除くすべての \fIx\fP で次式も成立する:
89 .sp
90     Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x)
91 .PP
92 .\"O .SH RETURN VALUE
93 .SH 返り値
94 .\"O On success, these functions return Gamma(x).
95 成功すると、これらの関数は Gamma(x) を返す。
96
97 .\"O If
98 .\"O .I x
99 .\"O is a NaN, a NaN is returned.
100 .I x
101 が NaN の場合、NaN が返される。
102
103 .\"O If
104 .\"O .I x
105 .\"O is positive infinity, positive infinity is returned.
106 .I x
107 が正の無限大の場合、正の無限大が返される。
108
109 .\"O If
110 .\"O .I x
111 .\"O is a negative integer, or is negative infinity,
112 .\"O a domain error occurs,
113 .\"O and a NaN is returned.
114 .I x
115 が負の整数か負の無限大の場合、領域エラー (domain error) が発生し、
116 NaN が返される。
117
118 .\"O If the result overflows,
119 .\"O a range error occurs,
120 .\"O and the functions return
121 .\"O .BR HUGE_VAL ,
122 .\"O .BR HUGE_VALF ,
123 .\"O or
124 .\"O .BR HUGE_VALL ,
125 .\"O respectively, with the correct mathematical sign.
126 結果がオーバーフローする場合、範囲エラー (range error) が発生し、
127 各関数はそれぞれ
128 .BR HUGE_VAL ,
129 .BR HUGE_VALF ,
130 .BR HUGE_VALL ,
131 を返す。この際、数学的に正しい符号が付与される。
132
133 .\"O If the result underflows,
134 .\"O a range error occurs,
135 .\"O and the functions return 0, with the correct mathematical sign.
136 結果がアンダーフローする場合、範囲エラー (range error) が発生し、
137 関数は 0 をを返す。この際、数学的に正しい符号が付与される。
138
139 .\"O If
140 .\"O .I x
141 .\"O is \-0 or +0,
142 .\"O a pole error occurs,
143 .\"O and the functions return
144 .\"O .BR HUGE_VAL ,
145 .\"O .BR HUGE_VALF ,
146 .\"O or
147 .\"O .BR HUGE_VALL ,
148 .\"O respectively, with the same sign as the 0.
149 .I x
150 が \-0 か +0 の場合、極エラー (pole error) が発生し、
151 各関数はそれぞれ
152 .BR HUGE_VAL ,
153 .BR HUGE_VALF ,
154 .BR HUGE_VALL ,
155 を返す。
156 0 と同じ符号が付与される。
157 .\"O .SH ERRORS
158 .SH エラー
159 .\"O See
160 .\"O .BR math_error (7)
161 .\"O for information on how to determine whether an error has occurred
162 .\"O when calling these functions.
163 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
164 .BR math_error (7)
165 を参照のこと。
166 .PP
167 .\"O The following errors can occur:
168 以下のエラーが発生する可能性がある。
169 .TP
170 .\"O Domain error: \fIx\fP is a negative integer, or negative infinity
171 領域エラー: \fIx\fP が負の整数か負の無限大
172 .\" FIXME . errno is not set to EDOM for x == -inf
173 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6809
174 .\"O .I errno
175 .\"O is set to
176 .\"O .BR EDOM .
177 .\"O An invalid floating-point exception
178 .\"O .RB ( FE_INVALID )
179 .\"O is raised (but see BUGS).
180 .I errno
181
182 .B EDOM
183 が設定される。
184 不正 (invalid) 浮動小数点例外
185 .RB ( FE_INVALID )
186 が上がる (「バグ」の節を参照)。
187 .TP
188 .\"O Pole error: \fIx\fP is +0 or \-0
189 極エラー (pole error): \fIx\fP が +0 か \-0
190 .\"O .I errno
191 .\"O is set to
192 .\"O .BR ERANGE .
193 .\"O A divide-by-zero floating-point exception
194 .\"O .RB ( FE_DIVBYZERO )
195 .\"O is raised.
196 .I errno
197
198 .B ERANGE
199 が設定される。
200 0 による除算 (divide-by-zero) 浮動小数点例外
201 .RB ( FE_DIVBYZERO )
202 が上がる。
203 .TP
204 .\"O Range error: result overflow
205 範囲エラー (range error): 結果のオーバーフロー
206 .\"O .I errno
207 .\"O is set to
208 .\"O .BR ERANGE .
209 .\"O An overflow floating-point exception
210 .\"O .RB ( FE_OVERFLOW )
211 .\"O is raised.
212 .I errno
213
214 .B ERANGE
215 が設定される。
216 オーバーフロー浮動小数点例外
217 .RB ( FE_OVERFLOW )
218 が上がる。
219 .PP
220 .\"O glibc also gives the following error which is not specified
221 .\"O in C99 or POSIX.1-2001.
222 glibc では、C99 や POSIX.1-2001 で規定されていない以下のエラーも
223 起こり得る。
224 .TP
225 .\"O Range error: result underflow
226 範囲エラー (range error): 結果のアンダーフロー
227 .\" e.g., tgamma(-172.5) on glibc 2.8/x86-32
228 .\" .I errno
229 .\" is set to
230 .\" .BR ERANGE .
231 .\"O An underflow floating-point exception
232 .\"O .RB ( FE_UNDERFLOW )
233 .\"O is raised.
234 .\"O .IP
235 .\"O .I errno
236 .\"O is not set for this case.
237 アンダーフロー浮動小数点例外
238 .RB ( FE_UNDERFLOW )
239 が上がる。
240 この場合は
241 .I errno
242 は設定されない。
243 .\" FIXME . Is it intentional that errno is not set:
244 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6810
245 .\"
246 .\" glibc (as at 2.8) also supports and an inexact
247 .\" exception for various cases.
248 .\"O .SH VERSIONS
249 .SH バージョン
250 .\"O These functions first appeared in glibc in version 2.1.
251 これらの関数は glibc バージョン 2.1 で初めて登場した。
252 .\"O .SH "CONFORMING TO"
253 .SH 準拠
254 C99, POSIX.1-2001.
255 .\"O .SH NOTES
256 .SH 注意
257 .\"O This function had to be called "true gamma function"
258 .\"O since there is already a function
259 .\"O .BR gamma (3)
260 .\"O that returns something else (see
261 .\"O .BR gamma (3)
262 .\"O for details).
263 この関数を「本当の (true) ガンマ関数」と呼ばなければならなかった。
264 なぜなら、他の値を返す
265 .BR gamma (3)
266 という関数がすでに存在するからである (詳細については
267 .BR gamma (3)
268 を参照)。
269 .\"O .SH BUGS
270 .SH バグ
271 .\"O If
272 .\"O .I x
273 .\"O is negative infinity,
274 .\"O .I errno
275 .\"O is not set (it should be set to
276 .\"O .BR EDOM ).
277 .I x
278 が負の無限大の場合、
279 .I errno
280 は設定されない
281 .RB ( EDOM
282 が設定されるべきである)。
283 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6809
284
285 .\"O In glibc versions 2.3.3 and earlier,
286 .\"O an argument of +0 or \-0 incorrectly produced a domain error
287 .\"O .RI ( errno
288 .\"O set to
289 .\"O .B EDOM
290 .\"O and an
291 .\"O .B FE_INVALID
292 .\"O exception raised), rather than a pole error.
293 glibc バージョン 2.3.3 以前では、
294 引き数に +0 や \-0 を渡すと、極エラーではなく、
295 領域エラーを間違って発生していた
296 (領域エラーの場合、
297 .I errno
298
299 .B EDOM
300 を設定され、
301 .B FE_INVALID
302 例外が発生する)。
303 .\"O .SH "SEE ALSO"
304 .SH 関連項目
305 .BR gamma (3),
306 .BR lgamma (3)