Skip to main content

hyp1f2

Function hyp1f2 

Source
pub fn hyp1f2(a: f64, b1: f64, b2: f64, z: f64) -> f64
Expand description

The generalized hypergeometric function ${1}F{2}(a; b_{1}, b_{2}; z) = \sum_{k \ge 0} \frac{(a){k}}{(b{1}){k} (b{2}){k}} \frac{z^{k}}{k!}$ by its power series, which converges for every $z$ ($(x){k}$ the rising factorial; $b_{1}, b_{2}$ not zero or negative integers). The ICI of OFDM under Jakes’ fading is $1 - {}{1}F{2}(\tfrac{1}{2}; \tfrac{3}{2}, 2; -(\pi f_{D} T_{u})^{2})$ (Robertson & Kaiser 1999; Nissel, Schwarz & Rupp 2017, eq. (42)).

§Examples

use comnum_math::hyp1f2;
// 1F2(1/2; 3/2, 2; -x^2) = 1 - x^2/6 + x^4/60 - ...
let x = 0.1;
assert!((hyp1f2(0.5, 1.5, 2.0, -x * x) - (1.0 - x * x / 6.0 + x.powi(4) / 60.0)).abs() < 1e-8);
// 0F1-like limit: 1F2(a; a, 1; z) = 0F1(; 1; z) = I0(2 sqrt z)
assert!((hyp1f2(1.0, 1.0, 1.0, 1.0) - 2.279_585_302_336_067).abs() < 1e-12);