Gamma Class 
Namespace: Accord.Math
The Gamma type exposes the following members.
Name  Description  

Digamma 
Digamma function.
 
Function 
Gamma function of the specified value.
 
Inverse 
Inverse of the complemented
incomplete Gamma integral (UpperIncomplete, Q).
 
InverseLowerIncomplete 
Inverse of the
incomplete Gamma integral (LowerIncomplete, P).
 
InverseUpperIncomplete 
Inverse of the complemented
incomplete Gamma integral (UpperIncomplete, Q).
 
Log(Double) 
Natural logarithm of the gamma function.
 
Log(Double, Int32) 
Natural logarithm of the multivariate Gamma function.
 
LowerIncomplete 
Lower incomplete regularized gamma function P
(a.k.a. the incomplete Gamma function).
 
Multivariate 
Multivariate Gamma function
 
Stirling 
Gamma function as computed by Stirling's formula.
 
Trigamma 
Trigamma function.
 
UpperIncomplete 
Upper incomplete regularized Gamma function Q
(a.k.a the incomplete complemented Gamma function)

In mathematics, the gamma function (represented by the capital Greek letter Γ) is an extension of the factorial function, with its argument shifted down by 1, to real and complex numbers. That is, if n is a positive integer:
Γ(n) = (n1)!
The gamma function is defined for all complex numbers except the negative integers and zero. For complex numbers with a positive real part, it is defined via an improper integral that converges:
∞ Γ(z) = ∫ t^(z1)e^(t) dt 0
This integral function is extended by analytic continuation to all complex numbers except the nonpositive integers (where the function has simple poles), yielding the meromorphic function we call the gamma function.
The gamma function is a component in various probabilitydistribution functions, and as such it is applicable in the fields of probability and statistics, as well as combinatorics.
References:
double x = 0.17; // Compute main Gamma function and variants double gamma = Gamma.Function(x); // 5.4511741801042106 double gammap = Gamma.Function(x, p: 2); // 39.473585841300675 double log = Gamma.Log(x); // 1.6958310313607003 double logp = Gamma.Log(x, p: 2); // 3.6756317353404273 double stir = Gamma.Stirling(x); // 24.040352622960743 double psi = Gamma.Digamma(x); // 6.2100942259248626 double tri = Gamma.Trigamma(x); // 35.915302055854525 double a = 4.2; // Compute the incomplete regularized Gamma functions P and Q: double lower = Gamma.LowerIncomplete(a, x); // 0.000015685073063633753 double upper = Gamma.UpperIncomplete(a, x); // 0.9999843149269364