| a | x | gammaIncomplete(a, x) |
|---|---|---|
| negative | NaN | |
| < 0 | NaN | |
| positive | 0 | 0 |
| positive | ∞ | 1 |
| +0 | ≥ 0 | 1 |
| ∞ | (0, ∞) | 0 |
gammaIncomplete
fn
real gammaIncomplete(real a, real x ) pure nothrow @safe @nogcRegularized lower incomplete gamma function P(a,x)
Mathematically, P(a,x) = ln(Γ())(a,x)/Γ(a), where ln(Γ())(a,x) is the lower incomplete gamma function, ln(Γ())(a,x) = ∫0xta-1e-tdt, a ≥ 0, and x ≥ 0.
Parameters
a | the shape parameter, must be positive |
x | the fraction of integration completion from below, must be non-negative |
Returns
It returns P(a,x), an element of [0,1].