FLINT3.7.0-dev

_mp_real_sqrt_newton_rsqrtmul, _mp_real_sqrt_newton

Synopsis#include <flint/mp_real.h>
void _mp_real_sqrt_newton_rsqrtmul(nn_ptr q, nn_srcptr a, slong an, slong n)source
void _mp_real_sqrt_newton(nn_ptr q, nn_srcptr a, slong an, slong n)source

For a as for _mp_real_rsqrt_newton, set (q, n + 2) to an approximation of \sqrt{a} \in [1/B, 1) (the computed value can round up to 1) with absolute error at most 4 B^{-n}/\sqrt{a}, which is proportional to 1/\sqrt{a}, not to the output. The first function multiplies by the reciprocal square root; the second performs a Karp–Markstein iteration.

Cite this page

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