s21dac evaluates an approximation to the general elliptic integral of the second kind
given by
where
and
are real arguments,
is a complex argument whose real part is non-negative and
is a real argument (the
complementary modulus). The evaluation of
is based on the Gauss transformation. Further details, in particular for the conformal mapping provided by
, can be found in
Bulirsch (1960).
Special values include
or
(the
elliptic integral of the first kind) and
or
(the
elliptic integral of the second kind). Note that the values of
and
are equal to
in the trivial case
.
s21dac is derived from an Algol 60 procedure given by
Bulirsch (1960). Constraints are placed on the values of
and
in order to avoid the possibility of machine overflow.
Bulirsch R (1960) Numerical calculation of elliptic integrals and elliptic functions Numer. Math. 7 76–90
In principle the function is capable of achieving full relative precision in the computed values. However, the accuracy obtainable in practice depends on the accuracy of the standard elementary functions such as atan2 and log.
None.
This example evaluates the elliptic integral of the first kind
given by
where
and
, and prints the results.