FLINT3.7.0-dev

_flint_mpn_sqrtrem, _flint_mpn_sqrtrem_divconquer, _flint_mpn_sqrtrem_newton, _flint_mpn_sqrtrem_gmp, _flint_mpn_sqrt, _flint_mpn_is_square

Synopsis#include <flint/mpn_extras.h>
mp_size_t _flint_mpn_sqrtrem(mp_ptr s, mp_ptr r, mp_srcptr a, mp_size_t an)source
mp_size_t _flint_mpn_sqrtrem_divconquer(mp_ptr s, mp_ptr r, mp_srcptr a, mp_size_t an)source
void _flint_mpn_sqrtrem_newton(mp_ptr s, mp_ptr r, mp_srcptr a, mp_size_t an)source
void _flint_mpn_sqrtrem_gmp(mp_ptr s, mp_ptr r, mp_srcptr a, mp_size_t an)source
int _flint_mpn_sqrt(mp_ptr s, mp_srcptr a, mp_size_t an)source
int _flint_mpn_is_square(mp_srcptr a, mp_size_t an)source

The algorithms behind flint_mpn_sqrtrem, flint_mpn_sqrt and flint_mpn_is_square, with their interfaces: the dispatcher, the divide and conquer algorithm (requires \mathit{an} \ge 5 and needs no remainder space beyond \lceil \mathit{an}/2 \rceil + 1 limbs), the Newton algorithm, GMP's mpn_sqrtrem, and the checked root and square test after the test modulo 256.

Cite this page

The FLINT team, “_flint_mpn_sqrtrem, _flint_mpn_sqrtrem_divconquer, _flint_mpn_sqrtrem_newton, _flint_mpn_sqrtrem_gmp, _flint_mpn_sqrt, _flint_mpn_is_square (mpn_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_extras/_flint_mpn_sqrtrem.html (generated 2026-10-20).