gamma_series

Function gamma_series 

Source
fn gamma_series(n: f64, z: Complex) -> (Complex, f64)
Expand description

The power series of DLMF 8.7.3, Gamma(a,z) = Gamma(a) - z^a sum_k (-z)^k / (k! (a+k)), whose terms share a phase near the negative real axis; for a = -m, DLMF 8.4.15 replaces the Gamma(a) pole pair by (-1)^m (psi(m+1) - ln z) / m!. The principal logarithm and the signed zero of Im z select the side of the cut; the magnitude of the terms bounds the error.