Skip to content

ellipke

specfun · scripts/specfun/ellipke.m

: k = ellipke (m)
: [k, e] = ellipke (m)
: [k, e] = ellipke (m, tol)

Complete elliptic integrals of the first and second kind, k = K(m) and e = E(m), for the parameter m = k^2 of the real array m, with m <= 1.

Negative m is supported through the imaginary-modulus transformation. The integrals are evaluated with the arithmetic-geometric mean, iterated until its correction term is below tol (default: the machine epsilon of the class of m).