FLINT3.7.0-dev

acf_sqrt, acf_rsqrt

Synopsis#include <flint/acf.h>
int acf_sqrt(acf_t res, const acf_t x, slong prec, arf_rnd_t rnd)source
int acf_rsqrt(acf_t res, const acf_t x, slong prec, arf_rnd_t rnd)source

Set res to the principal square root of x, respectively its reciprocal, with each part correctly rounded (the relaxed modes as described above). The dyadic roots are computed exactly; otherwise the complex kernels of Limb-array kernels (or, for exponents beyond them, the compositions q=(∣x∣+∣a∣)/2q = \sqrt{(|x| + |a|)/2}, ∣b∣/(2q)|b|/(2q) and their quotients by ∣x∣|x| at prec + 64 bits), and a part that these leave undecided is decided exactly from the sign of a polynomial in aa, bb and the rounding boundary next to it, without retries. Real and purely imaginary arguments are handled by the real roots; rsqrt(0) is +∞+\infty.

Cite this page

The FLINT team, “acf_sqrt, acf_rsqrt (acf.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acf/acf_sqrt.html (generated 2026-11-17).