FLINT3.7.0-dev

_arf_mpn_div_approx, _arf_mpn_inv_approx, _arf_mpn_sqrt_approx, _arf_mpn_rsqrt_approx

Synopsis#include <flint/arf.h>
void _arf_mpn_div_approx(nn_ptr z, slong * zexp, nn_srcptr x, slong xn, nn_srcptr y, slong yn, slong prec)source
void _arf_mpn_inv_approx(nn_ptr z, slong * zexp, nn_srcptr y, slong yn, slong prec)source
void _arf_mpn_sqrt_approx(nn_ptr z, slong * zexp, nn_srcptr x, slong xn, int t, slong prec)source
void _arf_mpn_rsqrt_approx(nn_ptr z, slong * zexp, nn_srcptr x, slong xn, int t, slong prec)source

As above, but the rn\mathit{rn} limbs are written without rounding and without a flag (the kernels of nfloat without directed rounding): the quotients are the truncation or one ulp more (an error below an ulp, up to the truncation of operands beyond rn+2\mathit{rn} + 2 limbs; the truncation itself for a divisor with a single nonzero limb), the square root is the truncation, and the reciprocal square root is within 1+2−371 + 2^{-37} ulp.

The quotient uses the register and chain paths above without the rounding step, and otherwise the schoolbook approximate division at rn\mathit{rn} limbs (_flint_mpn_divapprox_basecase_preinv1, the floor or one more) up to 80 limbs, with the divisor truncated to rn+2\mathit{rn} + 2 limbs and the dividend to rn+yn\mathit{rn} + \mathit{yn}; beyond that, and for two-limb divisors, the guard-limb quotient truncated. The square root is the exact root up to the Newton range, and the reciprocal square root the one- or two-limb register kernel without certification, or the guard-limb root truncated.

Cite this page

The FLINT team, “_arf_mpn_div_approx, _arf_mpn_inv_approx, _arf_mpn_sqrt_approx, _arf_mpn_rsqrt_approx (arf.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arf/_arf_mpn_div_approx.html (generated 2026-11-20).