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>
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>
17 .TH TGAMMA 3 2010-09-20 "GNU" "Linux Programmer's Manual"
20 .\"O tgamma, tgammaf, tgammal \- true gamma function
21 tgamma, tgammaf, tgammal \- 本当のガンマ関数
26 .BI "double tgamma(double " x );
28 .BI "float tgammaf(float " x );
30 .BI "long double tgammal(long double " x );
32 .\"O Link with \fI\-lm\fP.
36 .\"O Feature Test Macro Requirements for glibc (see
37 .\"O .BR feature_test_macros (7)):
39 .RB ( feature_test_macros (7)
48 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
49 _POSIX_C_SOURCE\ >=\ 200112L;
57 .\"O The Gamma function is defined by
59 .\"O Gamma(x) = integral from 0 to infinity of t^(x\-1) e^\-t dt
61 .\"O It is defined for every real number except for nonpositive integers.
64 Gamma(x) = t^(x\-1) e^\-t dt の 0 から無限大までの積分
66 この関数は正でない整数を除くすべての実数に対して定義されている。
67 .\"O For nonnegative integral \fIm\fP one has
71 .\"O and, more generally, for all \fIx\fP:
73 .\"O Gamma(x+1) = x * Gamma(x)
75 .\"O Furthermore, the following is valid for all values of \fIx\fP
76 .\"O outside the poles:
78 .\"O Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x)
80 非負の整数 \fIm\fP に関して、以下が成立する:
84 より一般的には、すべての \fIx\fP に関して以下が成立する:
86 Gamma(x+1) = x * Gamma(x)
88 さらに、極を除くすべての \fIx\fP で次式も成立する:
90 Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x)
94 .\"O On success, these functions return Gamma(x).
95 成功すると、これらの関数は Gamma(x) を返す。
99 .\"O is a NaN, a NaN is returned.
105 .\"O is positive infinity, positive infinity is returned.
107 が正の無限大の場合、正の無限大が返される。
111 .\"O is a negative integer, or is negative infinity,
112 .\"O a domain error occurs,
113 .\"O and a NaN is returned.
115 が負の整数か負の無限大の場合、領域エラー (domain error) が発生し、
118 .\"O If the result overflows,
119 .\"O a range error occurs,
120 .\"O and the functions return
125 .\"O respectively, with the correct mathematical sign.
126 結果がオーバーフローする場合、範囲エラー (range error) が発生し、
131 を返す。この際、数学的に正しい符号が付与される。
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 をを返す。この際、数学的に正しい符号が付与される。
142 .\"O a pole error occurs,
143 .\"O and the functions return
148 .\"O respectively, with the same sign as the 0.
150 が \-0 か +0 の場合、極エラー (pole error) が発生し、
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 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
167 .\"O The following errors can occur:
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
177 .\"O An invalid floating-point exception
178 .\"O .RB ( FE_INVALID )
179 .\"O is raised (but see BUGS).
188 .\"O Pole error: \fIx\fP is +0 or \-0
189 極エラー (pole error): \fIx\fP が +0 か \-0
193 .\"O A divide-by-zero floating-point exception
194 .\"O .RB ( FE_DIVBYZERO )
200 0 による除算 (divide-by-zero) 浮動小数点例外
204 .\"O Range error: result overflow
205 範囲エラー (range error): 結果のオーバーフロー
209 .\"O An overflow floating-point exception
210 .\"O .RB ( FE_OVERFLOW )
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 で規定されていない以下のエラーも
225 .\"O Range error: result underflow
226 範囲エラー (range error): 結果のアンダーフロー
227 .\" e.g., tgamma(-172.5) on glibc 2.8/x86-32
231 .\"O An underflow floating-point exception
232 .\"O .RB ( FE_UNDERFLOW )
236 .\"O is not set for this case.
243 .\" FIXME . Is it intentional that errno is not set:
244 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6810
246 .\" glibc (as at 2.8) also supports and an inexact
247 .\" exception for various cases.
250 .\"O These functions first appeared in glibc in version 2.1.
251 これらの関数は glibc バージョン 2.1 で初めて登場した。
252 .\"O .SH "CONFORMING TO"
257 .\"O This function had to be called "true gamma function"
258 .\"O since there is already a function
260 .\"O that returns something else (see
263 この関数を「本当の (true) ガンマ関数」と呼ばなければならなかった。
266 という関数がすでに存在するからである (詳細については
273 .\"O is negative infinity,
275 .\"O is not set (it should be set to
283 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6809
285 .\"O In glibc versions 2.3.3 and earlier,
286 .\"O an argument of +0 or \-0 incorrectly produced a domain error
292 .\"O exception raised), rather than a pole error.
293 glibc バージョン 2.3.3 以前では、
294 引き数に +0 や \-0 を渡すと、極エラーではなく、