CNLMath : Special Functions : bessel_exp_I1
bessel_exp_I1
Evaluates the exponentially scaled modified Bessel function of the first kind of order one.
Synopsis
#include <imsl.h>
float imsl_f_bessel_exp_I1 (float x)
The type double function is imsl_d_bessel_exp_I1.
Required Arguments
float x (Input)
Point at which the Bessel function is to be evaluated.
Return Value
The value of the scaled Bessel function e-|x| I1(x). If no solution can be computed, NaN is returned.
Description
The function imsl_f_bessel_I1 underflows if x / 2 underflows. The Bessel function I1(x) is defined to be
Example
The expression e-4.5I0(4.5) is computed directly by calling imsl_f_bessel_exp_I1 and in­directly by calling imsl_f_bessel_I1. The absolute difference is printed. For large x, the internal scaling provided by imsl_f_bessel_exp_I1 avoids overflow that may occur in insl_f_bessel_I1.
 
#include <imsl.h>
#include <stdio.h>
#include <math.h>
 
int main()
{
float x = 4.5;
float ans;
float error;
 
ans = imsl_f_bessel_exp_I1 (x);
printf("(e**(-4.5))I1(4.5) = %f\n\n", ans);
 
error = fabs(ans - (exp(-x)*imsl_f_bessel_I1(x)));
printf ("Error = %e\n", error);
}
Output
 
(e**(-4.5))I1(4.5) = 0.170959
 
Error = 1.469216e-09