_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)sourcemp_size_t _flint_mpn_sqrtrem_divconquer(mp_ptr s, mp_ptr r, mp_srcptr a, mp_size_t an)sourcevoid _flint_mpn_sqrtrem_newton(mp_ptr s, mp_ptr r, mp_srcptr a, mp_size_t an)sourcevoid _flint_mpn_sqrtrem_gmp(mp_ptr s, mp_ptr r, mp_srcptr a, mp_size_t an)sourceint _flint_mpn_sqrt(mp_ptr s, mp_srcptr a, mp_size_t an)sourceint _flint_mpn_is_square(mp_srcptr a, mp_size_t an)sourceThe 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).
@misc{flint-doc-mpn-extras-flint-mpn-sqrtrem,
author = {{The FLINT team}},
title = {{\_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)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_extras/_flint_mpn_sqrtrem.html},
note = {Generated 2026-10-20}
}