FLINT3.7.0-dev

fmpq_next_signed_minimal, _fmpq_next_signed_minimal

Synopsis#include <flint/fmpq.h>
void fmpq_next_signed_minimal(fmpq_t res, const fmpq_t x)source
void _fmpq_next_signed_minimal(fmpz_t rnum, fmpz_t rden, const fmpz_t num, const fmpz_t den)source

As fmpq_next_minimal, with each positive value followed by its negative: 0, 1, -1, 1/2, -1/2, 2, -2, 1/3, -1/3, \ldots Starting from zero, this generates every rational exactly once, by increasing height.

Cite this page

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