Function special::inc_gamma [] [src]

pub fn inc_gamma(x: f64, p: f64) -> f64

Compute the regularized lower incomplete gamma function.

The formula is as follows:

          γ(x, p)    1   x
P(x, p) = ------- = ---- ∫ t^(p-1) e^(-t) dt
           Γ(p)     Γ(p) 0

where γ is the incomplete lower gamma function, and Γ is the complete gamma function.

The code is based on a C implementation by John Burkardt. The original algorithm was published in Applied Statistics and is known as Algorithm AS 239.