_fmpq_cmp, _fmpq_cmp_fmpz, _fmpq_cmp_si, _fmpq_cmp_ui
Synopsis
#include <flint/fmpq.h>Compare p/q with r/s, r or c, returning a negative value, zero or a positive value. The denominators must be positive; the fractions need not be in lowest terms.
Guides#
Cite this page
The FLINT team, “_fmpq_cmp, _fmpq_cmp_fmpz, _fmpq_cmp_si, _fmpq_cmp_ui (fmpq.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpq/_fmpq_cmp.html (generated 2026-10-20).
@misc{flint-doc-fmpq-fmpq-cmp,
author = {{The FLINT team}},
title = {{\_fmpq\_cmp, \_fmpq\_cmp\_fmpz, \_fmpq\_cmp\_si, \_fmpq\_cmp\_ui (fmpq.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpq/_fmpq_cmp.html},
note = {Generated 2026-10-20}
}