Author(s): K.S. Kölbig | Library: MATHLIB |
Submitter: | Submitted: 07.06.1992 |
Language: Fortran | Revised: |
Function subprograms RELI1C, RELI2C, RELI3C and DELI1C, DELI2C, DELI3C calculate the complete elliptic integrals of the first, second and third kind, respectively.
Function subprograms RELIGC and DELIGC calculate a general complete elliptic integral.
Function subprograms RELIKC, RELIEC and DELIKC, DELIEC calculate the complete elliptic integrals K(k) and E(k).
On CDC and Cray computers, the double-precision versions DELI1C etc. 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.
The general integral:
For p < 0, this integral is defined by its principal value. See Notes for special cases.
The functions K(k) and E(k):
Other common definitions of the complete elliptic integrals and their
relations to ,
,
are
listed here for convenience (
):
First kind:
Second kind:
Third kind:
Structure:
FUNCTION subprograms
User Entry Names:
RELI1C, | RELI2C, | RELI3C, | RELIGC, | RELIKC, | RELIEC |
DELI1C, | DELI2C, | DELI3C, | DELIGC, | DELIKC, | DELIEC |
ELLICK ![]() |
ELLICE ![]() | |
DELLIK ![]() |
DELLIE ![]() |
Usage:
In any arithmetic expression, with and
,
RELI1C(AKP) | or | DELI1C(AKP) | has the value | ![]() |
RELI2C(AKP,A,B) | or | DELI2C(AKP,A,B) | has the value |
![]() |
RELI3C(AKP,AK2,P) | or | DELI3C(AKP,AK2,P) | has the value |
![]() |
RELIGC(AKP,P,A,B) | or | DELIGC(AKP,P,A,B) | has the value |
![]() |
RELIKC(AK) | or | DELIKC(AK) | has the value | K(k), |
RELIEC(AK) | or | DELIEC(AK) | has the value | E(k), |
The redundant parameter AK2 in RELI3C and DELI3C
permits improved accuracy when is small, i.e.
. In
this case,
should be calculated using
higher-precision arithmetic and then truncated before calling the
subprogram.
Method:
The evaluation of ,
,
is based on the Landen transformation, that of
on the Bartky
transformation. For details, see Ref. 1-3. For K(k) and E(k)
Chebyshev approximations are used (see Ref. 4).
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. RELI1C and DELI1C: .
2. RELI2C and DELI2C:
or
and
.
3. RELI3C and DELI3C: AKP*P 0.
4. RELIGC and DELIGC: .
5. RELIKC and DELIKC: ,
RELIEC and DELIEC:
.
Error handling:
Error C347.1: Restriction 1 is not satisfied.
Error C347.2: Restriction 2 is not satisfied.
Error C347.3: Restriction 3 is not satisfied.
Error C347.4: Restriction 4 is not satisfied.
Error C347.5: Restriction 5 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.
Notes:
Every linear combination of the three special complete elliptic
integrals K(k), E(k), may be expressed in terms of
:
Special examples are
If then
will evaluate any linear
combination of K(k), E(k),
without cancellation
(such as would occur, for example, if (K(k)-E
were to be
computed from values of K(k) and E(k) which had been computed
separately.
Other functions which can be represented by are the Jacobian
Zeta function
and the Heuman Lambda function
(see Ref. 5):
(Quoted from Ref. 3, slightly modified).
The subprograms for ,
are based on the
Algol60 procedures cel1, cel2 in Ref. 1, those for
on cel3 in Ref. 2, and those for
on cel in Ref. 3.
References: