Skip to main content

hyp2f2

Function hyp2f2 

Source
pub fn hyp2f2(a1: f64, a2: f64, b1: f64, b2: f64, z: f64) -> Option<f64>
Expand description

Generalized hypergeometric function $_2F_2$ for real arguments

This function is not available in SciPy.

§Notes

For all $z$,

$$ \hyp 2 2 {a_1\enspace a_2} {b_1\enspace b_2} z = \sum_{n=0}^\infty {\rpow{a_1}{n} \ \rpow{a_2}{n} \over \rpow{b_1}{n} \ \rpow{b_2}{n}} {z^n \over n!} , $$

with the rising factorial $\rpow \square n$ (pow_rising) 1. A non-positive integer $a_i = -n$ makes it a polynomial of degree at most $n$.

As in hyp3f2, an $a_i$ equal to a $b_j$ cancels it, also if it is a non-positive integer, so that the result is the $_1F_1$ of the other parameters (or $e^z$), and it is $+\infty$ if a $b_j$ is a non-positive integer $-m$, unless it is a polynomial of degree $\lt m$. It is NaN if an argument is NaN, and overflows to $\pm\infty$ for large $z > 0$. For an infinite argument, it is the limit as in hyppfq.

§Returns None

If the relative error could exceed about $10^{-13}$:

  • for some $z < 0$, e.g. $-50 < z < -25$ if all $\abs{a_i}, \abs{b_j} \le 3$, and wider for larger parameters;
  • for $z < 0$ beyond that if $a_1 - a_2$ is an integer (unless one of them cancels);
  • for some large parameters, also for $z > 0$;
  • near a zero, or if the result underflows;
  • for some infinite arguments, as for hyppfq.

§See also

  • hyp1f1: Kummer’s confluent hypergeometric function, $\hyp 1 1 a b z$
  • hyp3f2: Generalized hypergeometric function, $\hyp 3 2 {a_1\enspace a_2\enspace a_3} {b_1\enspace b_2} z$

  1. NIST Digital Library of Mathematical Functions https://dlmf.nist.gov/16.2 ↩