FLINT3.7.0-dev

flint_mpn_2add_n_inplace

Synopsis#include <flint/mpn_extras.h>
mp_limb_t flint_mpn_2add_n_inplace(mp_ptr rp, mp_srcptr ap, mp_srcptr bp, mp_size_t n)source

Sets (\mathit{rp}, n) to r + a + b modulo B^n and returns the carry (0, 1 or 2). Requires n \ge 4. Only available on x86-64 with the ADX instructions, where it is an assembly routine running two carry chains in parallel; FLINT_HAVE_NATIVE_mpn_2add_n_inplace is then defined.

Cite this page

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