Author(s): K.S. Kölbig | Library: MATHLIB |
Submitter: | Submitted: 07.06.1992 |
Language: Fortran | Revised: |
Function subprograms RELI1, RELI2, RELI3 and DELI1, DELI2, DELI3 calculate, for real argument x, the elliptic integrals of the first, second and third kind, respectively.
On CDC and Cray computers, the double-precision versions DELI1, DELI2 and DELI3 are not available.
Mainly for reasons of numerical stability, the algorithms are based on the following definitions:
First kind:
Second kind:
Third kind:
Note that .
For p < 0, the integral
is defined by its principal
value.
For the integral of the second kind, a special entry-mode argument
is provided which allows to be calculated when
, i.e. when k' is imaginary.
Other common definitions of the elliptic integrals and their
relations to ,
,
are
listed here for convenience (
):
First kind:
Second kind:
Third kind:
Structure:
FUNCTION subprograms
User Entry Names:
RELI1, RELI2, RELI3, DELI1,
DELI2, DELI3
Files Referenced: Unit 6
External References: ASINH, DASINH,
MTLMTR, ABEND
Usage:
In any arithmetic expression, with ,
RELI1(X,AKP) | or | DELI1(X,AKP) | has the value |
![]() |
RELI2(X,AKP,A,B,MODE) | or | DELI2(X,AKP,A,B,MODE) | has the value |
![]() |
RELI3(X,AKP,P) | or | DELI3(X,AKP,P) | has the value |
![]() |
The notation k'' indicates that, when calling RELI2 or
DELI2, the parameters AKP and MODE must be set
as follows:
If :
and
,
if :
and
Im k' = -ik' (real).
Method:
The evaluation of and
is based
on the Landen
transformation, that of
on the Bartky transformation.
for
is calculated by using a transformation of
the arguments. See Ref. 1 and 2 for details.
Accuracy:
The REAL functions (except on CDC and Cray computers) have full single-precision accuracy. The REAL functions on CDC and Cray, and the DOUBLE PRECISION functions on all computers have an accuracy approximately two significant digits less than the machine precision.
Restrictions:
1. RELI2 and DELI2: \
AKP*X**2 < 1 if MODE =-1.
2. RELI2 and DELI2: \
or
.
3. RELI3 and DELI3: P*X**2 1.
Error handling:
Error C346.1: Restriction 1 is not satisfied.
Error C346.2: Restriction 2 is not satisfied.
Error C346.3: Restriction 3 is not satisfied.
In all cases, the function value
is set equal to zero, and a message is written on Unit 6,
unless subroutine MTLSET (N002) has been called.
The subprograms are based on the Algol60 procedures el1, el2 in Ref. 1 and el3 in Ref. 2.
References: