Skip to main content

hypergeometric

Function hypergeometric 

Source
pub fn hypergeometric(a: f64, b: f64, c: f64, z: f64) -> f64
Expand description

Gauss’s hypergeometric function ₂F₁(a, b; c; z) for real arguments and z <= 1.

For z < -0.5 the Pfaff transformation maps the argument into (0, 1). For z >= 0.5 the 1 - z connection formula is used unless c - a - b is an integer, in which case the series is summed directly (slow, but correct, very near z = 1). At z = 1 Gauss’s summation theorem gives the value (+inf if c - a - b <= 0). Returns NaN for z > 1 (except when a or b is a non-positive integer, giving a polynomial) and for c a non-positive integer (unless the series terminates earlier).