C343: Bessel Functions J and I with Positive Argument and Non-Integer Order

Author(s): K.S. Kölbig Library: MATHLIB
Submitter: Submitted: 24.01.1986
Language: Fortran Revised: 15.03.1993

Subroutine subprograms BSJA, BSIA, DBSJA, DBSIA and QBSJA, QBSIA calculate the sequences of Bessel functions

displaymath150

for real argument x>0, tex2html_wrap_inline154 , and tex2html_wrap_inline156 .

The quadruple-precision versions QBSJA and QBSIA are available only on computers which support a REAL*16 Fortran data type.

Structure:

SUBROUTINE subprograms
User Entry Names: BSJA, BSIA, DBSJA, DBSIA, QBSJA, QBSIA
Files Referenced: Unit 6
External References: GAMMA, DGAMMA, QGAMMA, MTLMTR, ABEND

Usage:

Single-precision version:
CALL BSJA(X,A,NL,ND,B) or CALL BSIA(X,A,NL,ND,B)

X
(REAL) Argument x.
A
(REAL) Order a of the first Bessel function in the computed sequence.
NL
(INTEGER) Specifies the order tex2html_wrap_inline162 of the last Bessel function in the computed sequence. It is permissible for NL to be negative.
ND
(INTEGER) Requested number of correct significant decimal digits.
B
(REAL) One-dimensional array with dimension (0:d) where tex2html_wrap_inline164 .
On exit, tex2html_wrap_inline166 , tex2html_wrap_inline168 , contains tex2html_wrap_inline170 , tex2html_wrap_inline172 , tex2html_wrap_inline174 or tex2html_wrap_inline176 , the plus sign of the subscript being taken if tex2html_wrap_inline178 , the minus sign if tex2html_wrap_inline180 .
Double-precision version:
CALL DBSJA(X,A,NL,ND,B) or CALL DBSIA(X,A,NL,ND,B)
where X, A and B are of type DOUBLE PRECISION.
Quadruple-precision version:
CALL QBSJA(X,A,NL,ND,B) or CALL QBSIA(X,A,NL,ND,B)
where X, A and B are of type REAL*16.

Method:

For tex2html_wrap_inline182 , the method of computation is a variant of Miller's backwards recurrence algorithm (see Ref. 1). The requested accuracy is obtained, when possible, by a judicious choice of the initial value of the recursion index, together with at least one repetition of the recursion with this index increased by 5. For tex2html_wrap_inline184 , only the first two functions in the sequence are computed in this way. The remaining functions are computed by the standard Bessel function recurrence relation.

Restrictions:

tex2html_wrap_inline186 , tex2html_wrap_inline188 , tex2html_wrap_inline190 .

Accuracy:

If X is close to a zero of one of the functions tex2html_wrap_inline192 , the accuracy of that particular function will be less than ND significant digits. There may also be a loss of accuracy in any of the computed functions if A is close to 0 or 1, and in other special situations.

Error handling:

Error C343.1: tex2html_wrap_inline194 .
Error C343.2: tex2html_wrap_inline196 or tex2html_wrap_inline198 .
Error C343.3: tex2html_wrap_inline200 .
Error C343.4: Difficulties of convergence. Try smaller tex2html_wrap_inline202 .
In all cases, a message is written on Unit 6, unless subroutine MTLSET (N002) has been called. If Error 1 to 3 occurs, the initial contents of array B is left unchanged. If the requested accuracy cannot be obtained after the initial recursion index has been increased fifty times (Error 4), the contents of array B is undefined.

The subprogram is based on Algol procedures described in Ref. 1.

References:

  1. W. Gautschi, Algorithm 236, Bessel functions of the first kind, Collected Algorithms from CACM (1972)
tex2html_wrap_inline204

Michel Goossens Tue Jun 4 22:38:02 METDST 1996