Evaluates the exponentially scaled modified Bessel function of the first kind of order zero.
#include <imsl.h>
float imsl_f_bessel_exp_I0 (float x)
The type double function is imsl_d_bessel_exp_I0.
float x
(Input)
Point at which the Bessel function is to be evaluated.
The value of the scaled Bessel function e-|x| I0(x). If no solution can be computed, NaN is returned.
The Bessel function is I0(x) is defined to be

The expression e-4.5I0 (4.5) is computed directly by calling imsl_f_bessel_exp_I0 and indirectly by calling imsl_f_bessel_I0. The absolute difference is printed. For large x, the internal scaling provided by imsl_f_bessel_exp_I0 avoids overflow that may occur in imsl_f_bessel_I0.
#include <imsl.h>
#include <math.h>
main()
{
float x = 4.5;
float ans;
float error;
ans =
imsl_f_bessel_exp_I0 (x);
printf("(e**(-4.5))I0(4.5) = %f\n\n", ans);
error =
fabs(ans - (exp(-x)*imsl_f_bessel_I0(x)));
printf ("Error = %e\n", error);
}
(e**(-4.5))I0(4.5) = 0.194198
Error = 4.898845e-09
|
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |