FLINT3.7.0-dev

flint_mpn_gcd_full2, flint_mpn_gcd_full

Synopsis#include <flint/mpn_extras.h>
mp_size_t flint_mpn_gcd_full2(mp_ptr arrayg, mp_srcptr array1, mp_size_t limbs1, mp_srcptr array2, mp_size_t limbs2, mp_ptr temp)source
mp_size_t flint_mpn_gcd_full(mp_ptr arrayg, mp_srcptr array1, mp_size_t limbs1, mp_srcptr array2, mp_size_t limbs2)source

Set (\mathit{arrayg}, \ell) to the greatest common divisor of (\mathit{array1}, \mathit{limbs1}) and (\mathit{array2}, \mathit{limbs2}) and return its length \ell. Unlike GMP's mpn_gcd, the inputs need not be odd or ordered by size, and they are not destroyed; they must be nonzero with nonzero top limbs. temp must provide \mathit{limbs1} + \mathit{limbs2} limbs of scratch space, or be NULL. The common power of 2 is removed first and GMP's mpn_gcd is called on the odd parts.

Cite this page

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