FLINT3.7.0-dev

qqbar_guess

Synopsis#include <flint/qqbar.h>
int qqbar_guess(qqbar_t res, const acb_t z, slong max_deg, slong max_bits, int flags, slong prec)source

Tries to find an algebraic number of degree at most max_deg and height of at most max_bits bits contained in the ball z, using LLL to find an integer relation between 1, z, \ldots, z^{\mathit{max\_deg}} at working precision prec. Returns 1 and sets res on success. The result is only a heuristic: success does not prove that the number behind z equals res, and failure does not prove that no such algebraic number exists.

The precision should normally be the precision at which z was computed, and of the order of max_deg times max_bits at least. If flags is 1, a search with max_deg/4 is tried first when max_deg exceeds 8. A single search is done; when the size of the answer is unknown, call the function repeatedly with increasing parameters.

Cite this page

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