FLINT3.7.0-dev

arb_get_simplest_fmpq

Synopsis#include <flint/arb.h>
int arb_get_simplest_fmpq(fmpq_t res, const arb_t x)source

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).