Evaluates the exponentially scaled modified Bessel function
of the second kind
of order one.
#include <imsl.h>
float imsl_f_bessel_exp_K1 (float x)
The type double function is imsl_d_bessel_exp_K1.
float x
(Input)
Point at which the Bessel function is to be evaluated.
The value of the scaled Bessel function exK1(x). If no solution can be computed, NaN is returned.
The result

overflows if x is too close to zero. The definition of the Bessel function

The expression

is computed directly by calling imsl_f_bessel_exp_K1 and indirectly by calling imsl_f_bessel_K1. The absolute difference is printed. For large x, the internal scaling provided by imsl_f_bessel_exp_K1 avoids underflow that may occur in imsl_f_bessel_K1.
#include <imsl.h>
#include <math.h>
main()
{
float x = 0.5;
float ans;
float error;
ans =
imsl_f_bessel_exp_K1 (x);
printf("(e**0.5)K1(0.5) = %f\n\n", ans);
error =
fabs(ans - (exp(x)*imsl_f_bessel_K1(x)));
printf ("Error = %e\n", error);
}
(e**0.5)K1(0.5) = 2.731010
Error = 5.890406e-08
|
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |