next up previous index
Next: C344 Bessel Functions Up: CERNLIB Previous: C342 Struve Functions

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

Routine ID: C343
Author(s): K.S. KölbigLibrary: MATHLIB
Submitter: Submitted: 24.01.1986
Language: FortranRevised: 15.03.1993

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

Ja+n(x), Ja-n(x), Ia+n(x) or Ia-n(x),

for real argument x>0, 0≤a<1 , and n=0,1,2,...,N .

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 (C302), MTLMTR (N002), ABEND (Z035)

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 a+NL 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 d|NL| .
On exit, B(n) , (n = 0,1,2,...,|NL|) , contains Ja+n(X) , Ja-n(X) , Ia+n(X) or Ia-n(X) , the plus sign of the subscript being taken if NL≥0 , the minus sign if NL< 0 .
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 NL ≥0 , 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 NL < 0 , 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:

X > 0 , 0 ≤A < 1 , |NL| ≤100 .

Accuracy:

If X is close to a zero of one of the functions Ja+n(x) , 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: X ≤0 .
Error C343.2: A<0 or A ≥1 .
Error C343.3: |NL|>100 .
Error C343.4: Difficulties of convergence. Try smaller |ND| .
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)

C344



next up previous index
Next: C344 Bessel Functions Up: CERNLIB Previous: C342 Struve Functions


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995