FLINT3.7.0-dev

_flint_mpn_gcd_subdiv_step, _flint_mpn_hgcd_step, _flint_mpn_hgcd_itch, _flint_mpn_hgcd, _flint_mpn_hgcd_appr_itch, _flint_mpn_hgcd_appr, _flint_mpn_hgcd_reduce_itch, _flint_mpn_hgcd_reduce, _flint_mpn_gcdext_hook, _flint_mpn_gcdext_lehmer_n

Synopsis#include <flint/mpn_extras.h>
mp_size_t _flint_mpn_gcd_subdiv_step(mp_ptr ap, mp_ptr bp, mp_size_t n, mp_size_t s, _flint_mpn_gcd_subdiv_step_hook * hook, void * ctx, mp_ptr tp)source
mp_size_t _flint_mpn_hgcd_step(mp_size_t n, mp_ptr ap, mp_ptr bp, mp_size_t s, flint_mpn_hgcd_matrix_struct * M, mp_ptr tp)source
mp_size_t _flint_mpn_hgcd_itch(mp_size_t n)source
mp_size_t _flint_mpn_hgcd(mp_ptr ap, mp_ptr bp, mp_size_t n, flint_mpn_hgcd_matrix_struct * M, mp_ptr tp)source
mp_size_t _flint_mpn_hgcd_appr_itch(mp_size_t n)source
int _flint_mpn_hgcd_appr(mp_ptr ap, mp_ptr bp, mp_size_t n, flint_mpn_hgcd_matrix_struct * M, mp_ptr tp)source
mp_size_t _flint_mpn_hgcd_reduce_itch(mp_size_t n, mp_size_t p)source
mp_size_t _flint_mpn_hgcd_reduce(flint_mpn_hgcd_matrix_struct * M, mp_ptr ap, mp_ptr bp, mp_size_t n, mp_size_t p, mp_ptr tp)source
void _flint_mpn_gcdext_hook(void * p, mp_srcptr gp, mp_size_t gn, mp_srcptr qp, mp_size_t qn, int d)source
mp_size_t _flint_mpn_gcdext_lehmer_n(mp_ptr gp, mp_ptr up, mp_size_t * usize, mp_ptr ap, mp_ptr bp, mp_size_t n, mp_ptr tp)source

Ports of the GMP functions of the same names (without the leading _flint). _flint_mpn_hgcd reduces a,ba, b of nn limbs (one of the top limbs nonzero) until ∣a−b∣|a - b| fits in ⌊n/2⌋+1\lfloor n/2 \rfloor + 1 limbs, accumulating the reduction in MM (initialised for nn limbs) so that (a,b)T(a, b)^T is MM times the reduced pair, and returns the new size, or 0 if no reduction is possible; tp must have room for _flint_mpn_hgcd_itch(n) limbs. _flint_mpn_hgcd_appr computes an approximation of the same matrix from destroyed inputs.

Cite this page

The FLINT team, “_flint_mpn_gcd_subdiv_step, _flint_mpn_hgcd_step, _flint_mpn_hgcd_itch, _flint_mpn_hgcd, _flint_mpn_hgcd_appr_itch, _flint_mpn_hgcd_appr, _flint_mpn_hgcd_reduce_itch, _flint_mpn_hgcd_reduce, _flint_mpn_gcdext_hook, _flint_mpn_gcdext_lehmer_n (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_subdiv_step.html (generated 2026-11-02).