Confluent hypergeometric function

View versions (1)

Interface

#include <codecogs/maths/special/hypergeometric/hypergeo.h>

using namespace Maths::Special::Hypergeometric;

Computes the confluent hypergeometric function

f(a,b; x) = 1 + \frac{a x^1}{b 1!} + \frac{a(a+1) x^2}{b(b+1) 2!} + ...
(1)

Many higher transcendental functions are special cases of this power series.

As is evident from the formula, b must not be a negative integer or zero unless a is an integer with 0 >= a > b.

The routine attempts both a direct summation of the series and an asymptotic expansion. In each case error due to roundoff, cancellation, and nonconvergence is estimated.

The result with smaller estimated error is returned.

Accuracy:

Tested at random points (a, b, x), all three variables ranging from 0 to 30. <pre> Relative error: arithmetic domain # trials peak rms DEC 0,30 2000 1.2e-15 1.3e-16 IEEE 0,30 30000 1.8e-14 1.1e-15 </pre>

Larger errors can be observed when b is near a negative integer or zero. Certain combinations of arguments yield serious cancellation error in the power series summation and also are not in the region of near convergence of the asymptotic series. An error message is printed if the self-estimated relative error is greater than 1.0e-12.

References

Cephes Math Library Release 2.0: April, 1987

Parameters

x
argument
GPL Licence — free for non commercial use. See Licence details.

Interactive Calculator

a
b
x
Result