arb_get_simplest_fmpq
Synopsis
#include <flint/arb.h>Sets res to the rational number with smallest positive denominator in the closed interval represented by x, and among these the one with smallest absolute numerator (0 if x contains 0), and returns 1. Returns 0 and leaves res unchanged if x is not finite.
The rational is found from the continued fraction expansions of the endpoints. As with arb_get_unique_fmpz, very large or very small exponents of the midpoint or the endpoints can need much memory.
Cite this page
The FLINT team, “arb_get_simplest_fmpq (arb.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/arb/arb_get_simplest_fmpq.html (generated 2026-10-20).
@misc{flint-doc-arb-arb-get-simplest-fmpq,
author = {{The FLINT team}},
title = {{arb\_get\_simplest\_fmpq (arb.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/arb/arb_get_simplest_fmpq.html},
note = {Generated 2026-10-20}
}