qqbar_guess
#include <flint/qqbar.h>int qqbar_guess(qqbar_t res, const acb_t z, slong max_deg, slong max_bits, int flags, slong prec)sourceTries 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.
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).
@misc{flint-doc-qqbar-qqbar-guess,
author = {{The FLINT team}},
title = {{qqbar\_guess (qqbar.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/qqbar/qqbar_guess.html},
note = {Generated 2026-10-20}
}