fmpq_set_mpq, fmpq_get_mpq, fmpq_get_mpz_frac
Synopsis
#include <flint/fmpq.h>Convert from and to GMP rationals; fmpq_get_mpz_frac sets a and b to the numerator and denominator of c. The value is copied as it is, without canonicalisation. These functions are declared only if gmp.h is included before any FLINT header.
Guides#
Cite this page
The FLINT team, “fmpq_set_mpq, fmpq_get_mpq, fmpq_get_mpz_frac (fmpq.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpq/fmpq_set_mpq.html (generated 2026-10-20).
@misc{flint-doc-fmpq-fmpq-set-mpq,
author = {{The FLINT team}},
title = {{fmpq\_set\_mpq, fmpq\_get\_mpq, fmpq\_get\_mpz\_frac (fmpq.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpq/fmpq_set_mpq.html},
note = {Generated 2026-10-20}
}