Next: C312 Bessel Functions
Up: CERNLIB
Previous: C307 Digamma or
Routine ID: C309
| Author(s): I.J. Thompson, A.R. Barnett | Library: MATHLIB
|
Submitter: K.S. Kölbig | Submitted: 15.01.1988
|
Language: Fortran | Revised:
|
Subroutine subprograms CCLBES and WCLBES calculate any
one of the following
sequences of functions:
- Regular and irregular Coulomb wave functions
and their first derivatives with respect to z,
,
or simple combination of these;
- Spherical Bessel functions
and their first derivatives with respect to z,
,
or simple combination of these (spherical Hankel functions);
- Bessel functions
and their first derivatives with respect to z,
,
or simple combination of these (Hankel functions);
- Modified Bessel functions
and their first derivatives with respect to z,
;
for complex arguments
, complex order
, and
On computers other than CDC or Cray, only
the double-precision version WCLBES is available.
On CDC and Cray computers, only the single-precision version
CCLBES is available.
Structure:
SUBROUTINE subprograms
User Entry Names: CCLBES, WCLBES
Internal Entry Names:
C309R1, C309R2, C309R3, C309R4, C309R5,
C309R6, C309R7, C309R8
Files Referenced: Unit 6
External References: CLGAMA, WLGAMA (C306),
CDIGAM, WDIGAM (C307)
Usage:
-
-
CALL CCLBES(Z,ETA,ZLMIN,NL,F,G,FP,GP,SIG,KFN,MODE,JFAIL,JPR)
or
-
-
CALL WCLBES(Z,ETA,ZLMIN,NL,F,G,FP,GP,SIG,KFN,NODE,JFAIL,JPR)
where
Z, ETA, ZLMIN, F, G, FP,
GP, SIG are of type COMPLEX for subroutine
CCLBES and of type COMPLEX*16 for subroutine WCLBES,
and where NL, KFN, MODE, JFAIL, JPR
are of type INTEGER.
- Z
- Argument
.
- ETA
- Argument
(ignored if
).
- ZLMIN
- Order
of the first function
in the computed sequence.
- NL
- Specifies the order
of the last
function in the computed sequence. (
).
- F,G,FP,GP
- One-dimensional arrays with dimension (0:d)
where d is in each case
.
On exit, each of F(n),G(n),FP(n),GP(n) may contain
the value of a function of order
, or its first
order derivative,
, as specified jointly by
KFN and |MODE|.
- SIG
- One-dimensional array with dimension (0:d),
where
. On exit, provided
,
SIG(n) contains the Coulomb phase shift
for
.
- KFN
- Specifies, in conjunction with the absolute value of
MODE, the type of functions which are stored.
- MODE
- The absolute value of MODE specifies, in conjunction
with KFN, the type of function which are stored, and also specifies
which of the arrays F,G,FP,GP are in fact set to meaningful values.
The sign of MODE specifies whether or not the functions are
multiplied by a scaling factor.
- JFAIL
- On exit, JFAIL is set to zero if no error condition is
detected. Otherwise JFAIL is set as described under
Error handling.
- JPR
-
Suppress printing of error messages.
-
-
Print error messages.
The type of function which is stored in array F depends only on
KFN, while the type of function which is stored in array G
depends both on KFN and on |MODE|. Arrays FP and
GP (if set) contain the first order derivatives with respect to z
of the functions in F and G, respectively.
Using the abbreviations (
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the choice of function is given by the following table:
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If KFN=0 the phase shifts
are stored in array
SIG. Otherwise SIG is not set.
Which of arrays F,G,FP,GP are in fact set is determined by
|MODE|
according to the following table:
| F | G | FP | GP
|
1, 11, 21 | set | set | set | set
|
2, 12, 22 | set | set | - | -
|
3 | set | - | set | -
|
4 | set | - | - | -
|
|
In both the tables above, a dash indicates that the corresponding
array does not contain meaningful values on exit. These arrays are,
however, used internally as working space, and must therefore be
dimensioned correctly.
The sign of MODE specifies whether or not the functions are to be
multiplied by a scaling factor, depending only on z, which will bring
their values closer to unity when |z| is large, or
is small
and
. The same scaling factor is applied to the first
order derivatives in FP or GP as is
applied to the functions in F or G, respectively.
- MODE
-
No scaling factor.
- MODE
-
Let
if
,
if
;
then the scaling factors for F and G are
|
|
|
|
|
|
|
|
|
|
|
|
Method:
The method is described in the References.
Restrictions:
See Ref. 1, in particular Sect. 4.
Accuracy:
The absolute values of the results are usually
accurate to within two or three decimal digits of the machine
precision. For details of exceptions see Ref. 1, Sect. 4.
Error handling:
If an error condition is detected, JFAIL is
set to one of the following values and a message is printed if
.
-
- An arithmetic error occurred
during the final recursion. Correct results are available up to and
including subscript value NL-JFAIL-1.
-
- One of the continued fraction
calculations failed or there was an arithmetic error before any results
could be calculated.
-
- Argument out of range.
-
- One or more functions
corresponding to
could not be calculated. Some values
corresponding to
may be correct.
-
- Excessive internal cancellation
probably renders the result meaningless.
This program package is a modified version of the CPC Program Library
package COULCC (see Ref. 1). The changes are formal, not
computational.
References:
- I.J. Thompson and A.R. Barnett, COULCC: A
continued-fraction algorithm for Coulomb functions of complex order
with complex arguments, Comput. Phys. Comm. 36 (1985) 363--372.
- I.J. Thompson and A.R. Barnett, Coulomb and Bessel functions of
complex arguments and order, J. Comput. Phys. 64 (1986) 490--509.
A copy of Ref. 1 is available in the Program Library Office.
C312
Next: C312 Bessel Functions
Up: CERNLIB
Previous: C307 Digamma or
Janne Saarela
Mon Apr 3 15:06:23 METDST 1995