FLINT3.7.0-dev

fmpq_set_fmpz_frac

Synopsis#include <flint/fmpq.h>
void fmpq_set_fmpz_frac(fmpq_t res, const fmpz_t p, const fmpz_t q)source

Sets res to the canonical form of p/q, for any integers p and q \ne 0 (not checked).

Guides#

Cite this page

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