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"
19 tgamma, tgammaf, tgammal \- 本当のガンマ関数
23 .BI "double tgamma(double " x );
25 .BI "float tgammaf(float " x );
27 .BI "long double tgammal(long double " x );
33 .RB ( feature_test_macros (7)
42 _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE ||
43 _POSIX_C_SOURCE\ >=\ 200112L;
52 Gamma(x) = t^(x\-1) e^\-t dt の 0 から無限大までの積分
54 この関数は正でない整数を除くすべての実数に対して定義されている。
55 非負の整数 \fIm\fP に関して、以下が成立する:
59 より一般的には、すべての \fIx\fP に関して以下が成立する:
61 Gamma(x+1) = x * Gamma(x)
63 さらに、極を除くすべての \fIx\fP で次式も成立する:
65 Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x)
68 成功すると、これらの関数は Gamma(x) を返す。
77 が負の整数か負の無限大の場合、領域エラー (domain error) が発生し、
80 結果がオーバーフローする場合、範囲エラー (range error) が発生し、
85 を返す。この際、数学的に正しい符号が付与される。
87 結果がアンダーフローする場合、範囲エラー (range error) が発生し、
88 関数は 0 をを返す。この際、数学的に正しい符号が付与される。
91 が \-0 か +0 の場合、極エラー (pole error) が発生し、
99 これらの関数を呼び出した際にエラーが発生したかの判定方法についての情報は
105 領域エラー: \fIx\fP が負の整数か負の無限大
106 .\" FIXME . errno is not set to EDOM for x == -inf
107 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6809
116 極エラー (pole error): \fIx\fP が +0 か \-0
121 0 による除算 (divide-by-zero) 浮動小数点例外
125 範囲エラー (range error): 結果のオーバーフロー
134 glibc では、C99 や POSIX.1-2001 で規定されていない以下のエラーも
137 範囲エラー (range error): 結果のアンダーフロー
138 .\" e.g., tgamma(-172.5) on glibc 2.8/x86-32
148 .\" FIXME . Is it intentional that errno is not set:
149 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6810
151 .\" glibc (as at 2.8) also supports and an inexact
152 .\" exception for various cases.
154 これらの関数は glibc バージョン 2.1 で初めて登場した。
158 この関数を「本当の (true) ガンマ関数」と呼ばなければならなかった。
161 という関数がすでに存在するからである (詳細については
171 .\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6809
173 glibc バージョン 2.3.3 以前では、
174 引き数に +0 や \-0 を渡すと、極エラーではなく、