[][src]Function mathru::special::gamma::gamma

pub fn gamma<T>(z: T) -> T where
    T: Real

Gamma function

Γ(z) = ∫ 0 tz-1(1-t)-x dx

Fore more information: https://en.wikipedia.org/wiki/Gamma_function

Arguments

  • z

Example

extern crate mathru;
use mathru::special::gamma;
let z: f64 = 0.3_f64;
let gamma: f64 = gamma::gamma(z);

The following approximation is implemented https://en.wikipedia.org/wiki/Lanczos_approximation