FLINT3.7.0-dev

arb_sqrt, arb_sqrt_arf, arb_sqrt_fmpz, arb_sqrt_ui

Synopsis#include <flint/arb.h>
void arb_sqrt(arb_t z, const arb_t x, slong prec)source
void arb_sqrt_arf(arb_t z, const arf_t x, slong prec)source
void arb_sqrt_fmpz(arb_t z, const fmpz_t x, slong prec)source
void arb_sqrt_ui(arb_t z, ulong x, slong prec)source

Set z to \sqrt{x}. If x contains negative numbers the result is indeterminate; use arb_sqrtpos when the negative part is known to be spurious.

For x = [m \pm r] with 0 \le r \le m the propagated error is bounded by \sqrt{m} - \sqrt{m - r} \le \frac{\sqrt{m}}{2}(r/m + (r/m)^2). The midpoint is computed with arf_sqrt in the relaxed mode ARF_RND_FAST (Newton iteration from 100000 bits); as for arb_div, its inexact flag is reliable, so exact input gives radius 0 exactly when the square root is exact.

Guides#

Cite this page

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