FLINT3.7.0-dev

acb_elliptic_k

Synopsis#include <flint/acb_elliptic.h>
void acb_elliptic_k(acb_t k, const acb_t m, slong prec)source

Sets k to the complete elliptic integral of the first kind K(m) = \int_0^{\pi/2} (1 - m \sin^2 t)^{-1/2} \, dt, computed as K(m) = \pi / (2 M(\sqrt{1-m})) where M(z) = \operatorname{agm}(1, z) is computed by acb_agm1. The branch cut is m \in [1, \infty).

K(m) = \int_0^{\pi/2} \frac{dt}{\sqrt{1-m \sin^2 t}} = \int_0^1 \frac{dt}{\sqrt{1-t^2}\sqrt{1-mt^2}}.

The AGM converges quadratically, so the cost is O(\log p) square roots at precision p; see Elliptic integrals, elliptic functions and modular forms.

Cite this page

The FLINT team, “acb_elliptic_k (acb_elliptic.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acb_elliptic/acb_elliptic_k.html (generated 2026-10-20).