pub fn hyp2f1<T: Hyp2F1Arg>(a: f64, b: f64, c: f64, z: T) -> TExpand description
Gauss’ hypergeometric function $_2F_1$
Corresponds to scipy.special.hyp2f1 in SciPy, and accepts both f64 and
num_complex::Complex<f64> inputs for z.
§Notes
This function is defined for $\abs z < 1$ as
$$ \hyp 2 1 {a_1\enspace a_2} b z = \sum_{n=0}^\infty {\rpow{a_1}{n} \ \rpow{a_2}{n} \over \rpow b n} {z^n \over n!} , $$
and defined on the rest of the complex $z$-plane by analytic continuation 1.
Here $\rpow \square n$ is the rising factorial; see pow_rising.
When defined, a non-positive integer $a_1$ or $a_2$ equal to $-n$ makes the result a polynomial of
degree at most $n$.
For f64 $z$, a finite result may be replaced by NaN if the internal error estimates say that
none of its digits are correct.
The implementation for complex values of $z$ is described in 2, except for $z$ in the region defined by
$$ 0.9 \le \abs z < 1.1 , \ \abs{1 - z} \ge 0.9 , \ \mathrm{Re}(z) \ge 0 $$
in which the implementation follows 3.
§See also
hyp0f1: Confluent hypergeometric limit function, $_0F_1\left[b\middle| z\right]$hyp1f1: Kummer’s confluent hypergeometric function, $\hyp 1 1 a b z$
NIST Digital Library of Mathematical Functions https://dlmf.nist.gov/15.2 ↩
S. Zhang and J.M. Jin, “Computation of Special Functions”, Wiley 1996 ↩
J.L. Lopez and N.M. Temme, “New series expansions of the Gauss hypergeometric function”, Adv Comput Math 39, 349-365 (2013). https://doi.org/10.1007/s10444-012-9283-y ↩