Evaluates a sequence of modified Bessel functions of the second kind with real order and complex arguments.
#include <imsl.h>
f_complex *imsl_c_bessel_Kx (float xnu, f_complex z, int n, ¼, 0)
The type d_complex function is imsl_z_bessel_Jx.
float xnu
(Input)
The lowest order desired. The argument xnu must be greater
than −1/2.
f_complex z
(Input)
Argument for which the sequence of Bessel functions is to be
evaluated.
int n
(Input)
Number of elements in the sequence.
A pointer to the n values of the function through the series. Element i contains the value of the Bessel function of order xnu + i for i = 0, ¼, n − 1.
f_complex
*imsl_c_bessel_Kx (float
xnu,
f_complex
z, int IMSL_RETURN_USER, f_complex
bessel[],
0)
IMSL_RETURN_USER, f_complex bessel[]
(Output)
Store the sequence of Bessel functions in the user-provided array
bessel[].
The Bessel function Kn(z) is defined to be

This function is based on the code BESSCC of Barnett (1981) and Thompson and Barnett (1987).
For moderate or large arguments, z, Temme’s (1975) algorithm is used to find Kn(z). This involves evaluating a continued fraction. If this evaluation fails to converge, the answer may not be accurate. For small z, a Neumann series is used to compute Kn(z). Upward recurrence of the Kn(z) is always stable.
In this example, K0.3+n-1 (1.2 + 0.5i), ν = 1, ¼, 4 is computed and printed.
#include
<imsl.h>
main()
{
int n = 4;
int i;
float xnu = 0.3;
static f_complex z = {1.2, 0.5};
f_complex *sequence;
sequence =
imsl_c_bessel_Kx(xnu, z, n, 0);
for (i = 0; i < n;
i++)
printf("K sub %4.2f ((%4.2f,%4.2f)) =
(%5.3f,%5.3f)\n",
xnu+i, z.re,
z.im, sequence[i].re, sequence[i].im);
}
K sub 0.30 ((1.20,0.50)) = (0.246,-0.200)
K sub 1.30
((1.20,0.50)) = (0.336,-0.362)
K sub 2.30 ((1.20,0.50)) = (0.587,-1.126)
K
sub 3.30 ((1.20,0.50)) = (0.719,-4.839)
|
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |