Function scilib::math::basic::kummer_function

source ·
pub fn kummer_function(a: f64, b: f64, x: f64) -> f64
Expand description

Kummer function

Definition

Kummer function, is a generalized hypergeometric series defined by: $$ M(a,b,z) = \sum_{n=0}^{\infty}\frac{a^{(n)}z^n}{b^{(n)}n!} $$

Inputs

  • a: first parameter, will be computed in the rising factorial ($a$)
  • b: second parameter, will be computed in the rising factorial ($b$)
  • x: the value to evaluate ($x$)

Returns the value of $M(a,b,x)$.

Example

let res = kummer_function(0.2, 1.3, 2.0);
let expected = 1.577568150906;
assert!((res - expected).abs() < 1.0e-8);