XLPack 7.0
XLPack Numerical Library (Excel VBA) Reference Manual
Loading...
Searching...
No Matches

◆ Hyp1f1r_sub()

Sub Hyp1f1r_sub ( Ret As  Double,
A As  Double,
B As  Double,
Z As  Double,
Optional Info As  Long 
)

Regularized hypergeometric functions 1F1(a; b; z)/Γ(b) (Subroutine version)

Purpose
Computes the regularized hypergeometric function 1F1(a; b; z)/Γ(b).
1F1(a; b; z)/Γ(b) = Σ(a)n * z^n / Γ(b + n) * n! (n = 0 to ∞)
Parameters
[out]RetThe regularized hypergeometric function 1F1(a; b; z)/Γ(b).
[in]AArgument a.
[in]BArgument b. (must not be a negative integer or zero unless A is an integer with B < A <= 0)
[in]ZArgument z.
[out]Info(Optional)
= 0: Successful exit.
= -1: The argument A or B had an illegal value. (A is not an integer with B < A <= 0 and B is a negative integer or zero)
= 1: Floating point range error.
Note
Problem domains that are still unsolved for this program exist as follows. Range error (Info = 1) may occur in those cases.
  • 1F1(-a, -b, -z): a, b and z all large.
  • 1F1(-a, -b, z): a < b, b > z, this is really the same domain as above.
  • 1F1(a, -b, z): There is a gap in between methods where no reliable implementation is possible, the issue becomes much worse for a, b and z all large.
  • 1F1(tiny a, b, -z): There are some values where either the series is non-convergent (most particularly for b < 0) or where the series becomes divergent after a few terms limiting the precision that can be achieved.
  • This program may abnormally terminate if the magnitude of a is very large.
Reference
boost/math/special_functions