RJBESL Subroutine

public subroutine RJBESL(X, ALPHA, NB, B, NCALC)



Explanation of machine-dependent constants

it = Number of bits in the mantissa of a working precision variable NSIG = Decimal significance desired. Should be set to INT(LOG10(2)it+1). Setting NSIG lower will result in decreased accuracy while setting NSIG higher will increase CPU time without increasing accuracy. The truncation error is limited to a relative error of T=.510(-NSIG). ENTEN = 10.0 K, where K is the largest integer such that ENTEN is machine-representable in working precision ENSIG = 10.0 NSIG RTNSIG = 10.0 (-K) for the smallest integer K such that K .GE. NSIG/4 ENMTEN = Smallest ABS(X) such that X/4 does not underflow XLARGE = Upper limit on the magnitude of X. If ABS(X)=N, then at least N iterations of the backward recursion will be executed. The value of 10.0 ** 4 is used on every machine.

 Approximate values for some important machines are:


                        it    NSIG    ENTEN       ENSIG

CRAY-1 (S.P.) 48 15 1.0E+2465 1.0E+15 Cyber 180/855 under NOS (S.P.) 48 15 1.0E+322 1.0E+15 IEEE (IBM/XT, SUN, etc.) (S.P.) 24 8 1.0E+38 1.0E+8 IEEE (IBM/XT, SUN, etc.) (D.P.) 53 16 1.0D+308 1.0D+16 IBM 3033 (D.P.) 14 5 1.0D+75 1.0D+5 VAX (S.P.) 24 8 1.0E+38 1.0E+8 VAX D-Format (D.P.) 56 17 1.0D+38 1.0D+17 VAX G-Format (D.P.) 53 16 1.0D+307 1.0D+16

                       RTNSIG      ENMTEN      XLARGE

CRAY-1 (S.P.) 1.0E-4 1.84E-2466 1.0E+4 Cyber 180/855 under NOS (S.P.) 1.0E-4 1.25E-293 1.0E+4 IEEE (IBM/XT, SUN, etc.) (S.P.) 1.0E-2 4.70E-38 1.0E+4 IEEE (IBM/XT, SUN, etc.) (D.P.) 1.0E-4 8.90D-308 1.0D+4 IBM 3033 (D.P.) 1.0E-2 2.16D-78 1.0D+4 VAX (S.P.) 1.0E-2 1.17E-38 1.0E+4 VAX D-Format (D.P.) 1.0E-5 1.17D-38 1.0D+4 VAX G-Format (D.P.) 1.0E-4 2.22D-308 1.0D+4



Error returns

In case of an error,  NCALC .NE. NB, and not all J's are
calculated to the desired accuracy.

NCALC .LT. 0:  An argument is out of range. For example,
   NBES .LE. 0, ALPHA .LT. 0 or .GT. 1, or X is too large.
   In this case, B(1) is set to zero, the remainder of the
   B-vector is not calculated, and NCALC is set to
   MIN(NB,0)-1 so that NCALC .NE. NB.

NB .GT. NCALC .GT. 0: Not all requested function values could
   be calculated accurately.  This usually occurs because NB is
   much larger than ABS(X).  In this case, B(N) is calculated
   to the desired accuracy for N .LE. NCALC, but precision
   is lost for NCALC .LT. N .LE. NB.  If B(N) does not vanish
   for N .GT. NCALC (because it is too small to be represented),
   and B(N)/B(NCALC) = 10**(-K), then only the first NSIG-K
   significant figures of B(N) can be trusted.

Intrinsic and other functions required are:

 ABS, AINT, COS, DBLE, GAMMA (or DGAMMA), INT, MAX, MIN,

 REAL, SIN, SQRT

Acknowledgement

This program is based on a program written by David J. Sookne (2) that computes values of the Bessel functions J or I of real argument and integer order. Modifications include the restriction of the computation to the J Bessel function of non-negative real argument, the extension of the computation to arbitrary positive order, and the elimination of most underflow.

References: "A Note on Backward Recurrence Algorithms," Olver, F. W. J., and Sookne, D. J., Math. Comp. 26, 1972, pp 941-947.

          "Bessel Functions of Real Argument and Integer Order,"
           Sookne, D. J., NBS Jour. of Res. B. 77B, 1973, pp
           125-132.

Latest modification: March 19, 1990

Author: W. J. Cody Applied Mathematics Division Argonne National Laboratory Argonne, IL 60439


Arguments

Type IntentOptional AttributesName
double precision :: X
double precision :: ALPHA
integer :: NB
double precision :: B
integer :: NCALC

Contents

None