BESSK_EXP Function (PV-WAVE Advantage)
Evaluates the exponentially scaled modified Bessel function of the third kind of orders zero and one.
Usage
result = BESSK_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 Bessel function exK0(x) or exK1(x)
Input Keywords
Double—If present and nonzero, double precision is used.
Discussion
If order is zero, the Bessel function K0(x) is defined to be:
If order is one, the value of the Bessel function K1(x):
The argument x must be greater than zero for the result to be defined.
Example
The expression:
is computed directly by calling BESSK_EXP and indirectly by calling BESSK. The absolute difference is printed. For large x, the internal scaling provided by BESSK_EXP avoids underflow that may occur in BESSK.
ans = BESSK_EXP(0, 0.5)
error = ABS(ans - (EXP(0.5))*BESSK(0, 0.5))
PRINT, ans
; PV-WAVE prints: 1.52411
PRINT, 'Error =', error
; PV-WAVE prints: Error = 1.1920929e-07
Fatal Errors
MATH_SMALL_ARG_OVERFLOW—The argument x must be large enough (x > max (1/b, s) where s is the smallest representable positive number and b is the largest repesentable number) that K1(x) does not overflow.
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.