next up previous index
Next: C345 Zeros of Up: CERNLIB Previous: C343 Bessel Functions

C344 Bessel Functions J with Complex Argument and Non-Integer Order

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

Subroutine subprograms CBSJA, WBSJA and WQBSJA calculate a sequence of Bessel functions

Ja+n(z),

for complex arguments z, 0≤a<1 , and n=0,1,2,...,N .

The quadruple-precision version WQBSJA is available only on computers which support a COMPLEX*32 Fortran data type.

Structure:

SUBROUTINE subprograms
User Entry Names: CBSJA, WBSJA, WQBSJA
Files Referenced: Unit 6
External References: GAMMA, DGAMMA, QGAMMA (C302), MTLMTR (N002), ABEND (Z035)

Usage:

Single-precision version:

    CALL CBSJA(Z,A,NL,ND,CB)
Z
( COMPLEX) Argument z.
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.
ND
( INTEGER) Requested number of correct significant decimal digits.
CB
( COMPLEX) One-dimensional array with dimension (0:d) where d ≥NL .
On exit, CB(n), (n=0,1,2,...,NL) , contains Ja+n(Z) .
Double-precision version:
    CALL WBSJA(Z,A,NL,ND,CB)
where A is of type DOUBLE PRECISION, Z and CB are of type COMPLEX*16.

On computers whose Fortran compiler does not support COMPLEX*16 arithmetic (e.g. CDC and Cray) the storage conventions for Z and CB are as follows:

Z
( DOUBLE PRECISION) Array of declared dimension (2) containing Re Z in Z(1) and Im Z in Z(2).
CB
( DOUBLE PRECISION) Two-dimensional array with dimensions (2,0:d) where d ≥NL . On exit, CB(1,n) contains Re Ja+n(Z) and CB(2,n) contains Im Ja+n(Z) , (n=0,1,2,...,NL) .
Quadruple-precision version:
    CALL WQBSJA(Z,A,NL,ND,CB)
where A is of type REAL*16, Z and CB are of type COMPLEX*32.

Method:

The method is an extension to complex arguments of 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.

Restrictions:

Im Z ≠0 if Re Z < 0 , 0 ≤A < 1 , 0 ≤NL ≤100 .

Accuracy:

If Z does not lie on the real axis, the requested accuracy is usually obtained. There may be a loss of accuracy if A is close to 0 or 1, and in other special situations.

Error handling:

Error C344.1: Z=X+iY with X ≤0

and Y=0 .
Error C344.2: A<0 or A ≥1 .
Error C344.3: NL<0 or NL>100 .
Error C344.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 CB 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 CB 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 (1965)

C345



next up previous index
Next: C345 Zeros of Up: CERNLIB Previous: C343 Bessel Functions


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