BESSI_EXP Function
Evaluates the exponentially scaled modified Bessel function of the first kind of orders zero and one.
Usage
result = BESSI_EXP(order, x)
Input Parameters
order—Order of the function. The order must be either zero or one.
x—Argument for which the function value is desired.
Returned Value
result—The value of the exponentially scaled modified Bessel function of the first kind of order zero or one evaluated at x.
Input Keywords
Double—If present and nonzero, double precision is used.
Discussion
If order is zero, the Bessel function is I0(x) is defined to be:
If order is one, the function I1(x) is defined to be:
If order is one then BESSI_EXP underfows if |x|/2 underflows.
Example
The expression e-4.5I0 (4.5) is computed directly by calling BESSI_EXP and indirectly by calling BESSI. The absolute difference is printed. For large x, the internal scaling provided by BESSI_EXP avoids overflow that may occur in BESSI.
Output
ans = BESSI_EXP(0, 4.5)
error = ABS(ans - EXP(-4.5)*BESSI(0, 4.5))
PRINT, ans
; PV-WAVE prints: 0.194198
PRINT, 'Error =', error
; PV-WAVE prints: Error = 4.4703484e-08