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

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

Gamma function

\Gamma(z) = \int_0^\infty t^{z-1} {\mathrm e}^{-t} \mathrm dt

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

Arguments

  • z

Panics

*z == 0.0

Example

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