FLINT3.7.0-dev

_fmpq_hgcd

Synopsis#include <flint/fmpq.h>
void _fmpq_hgcd(_fmpq_cfrac_list_t s, _fmpz_mat22_t M, fmpz_t x_num, fmpz_t x_den)source

Half-GCD step: for a=a = x_num >b=> b = x_den >0> 0, generate the terms valid for every real number in the open interval (a/(b+1),(a+1)/b)(a/(b+1), (a+1)/b), append them to ss, multiply MM on the right by their matrices and replace (a,b)(a, b) by the reduced pair, in place.

Cite this page

The FLINT team, “_fmpq_hgcd (fmpq.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpq/_fmpq_hgcd.html (generated 2026-11-02).