Evaluates a sequence of modified Bessel functions of the second kind of fractional order.
XNU — Fractional
order of the function. (Input)
XNU must be less than
one in absolute value.
X — Argument for which the sequence of Bessel functions is to be evaluated. (Input)
NIN — Number of elements in the sequence. (Input)
BK — Vector of length NIN containing the values of the function through the series. (Output)
Generic: CALL BSKS (XNU, X, NIN, BK)
Specific: The specific interface names are S_BSKS and D_BSKS.
Single: CALL BSKS (XNU, X, NIN, BK)
Double: The double precision name is DBSKS.
The Bessel function Kv(x) is defined to be
Currently, ν is restricted to be less than one in absolute value. A total of |n| values is stored in the array BK. For positive n, BK(1) = Kv (x), BK(2) = Kv+1(x), …, BK(n) = Kv+n −1(x). For negative n, BK(1) = Kv(x), BK(2) = Kv−1(x), …, BK(|n|) = K v+n+1
BSKS is based on the work of Cody (1983).
1. If NIN is positive, BK(1) contains the value of the function of order XNU, BK(2) contains the value of the function of order XNU + 1, … and BK(NIN) contains the value of the function of order XNU + NIN − 1.
2. If NIN is negative, BK(1) contains the value of the function of order XNU, BK(2) contains the value of the function of order XNU − 1, … and BK(ABS(NIN)) contains the value of the function of order XNU + NIN + 1.
In this example, Kv−1(10.0), ν = 1, …, 10 is computed and printed.
USE BSKS_INT
USE UMACH_INT
IMPLICIT NONE
! Declare variables
INTEGER NIN
PARAMETER (NIN=10)
!
INTEGER K, NOUT
REAL BS(NIN), X, XNU
! Compute
XNU = 0.0
X = 10.0
CALL BSKS (XNU, X, NIN, BS)
! Print the results
CALL UMACH (2, NOUT)
DO 10 K=1, NIN
WRITE (NOUT,99999) XNU+K-1, X, BS(K)
10 CONTINUE
99999 FORMAT (' K sub ', F6.3, ' (', F6.3, ') = ', E10.3)
END
K sub 0.000 (10.000) = 0.178E-04
K sub 1.000 (10.000) = 0.186E-04
K sub 2.000 (10.000) = 0.215E-04
K sub 3.000 (10.000) = 0.273E-04
K sub 4.000 (10.000) = 0.379E-04
K sub 5.000 (10.000) = 0.575E-04
K sub 6.000 (10.000) = 0.954E-04
K sub 7.000 (10.000) = 0.172E-03
K sub 8.000 (10.000) = 0.336E-03
K sub 9.000 (10.000) = 0.710E-03
PHONE: 713.784.3131 FAX:713.781.9260 |