acb_theta_ql_setup
#include <flint/acb_theta.h>int acb_theta_ql_setup(acb_ptr rts, acb_ptr rts_all, acb_ptr t, slong * guard, slong * easy_steps, acb_srcptr zs, slong nb, const acb_mat_t tau, arb_srcptr distances, slong nb_steps, int all, slong prec)sourcePrepares nb_steps \ge 1 duplication steps for the nb \ge 1 exact, reduced pairs (z, \tau) given by zs, whose first vector must be zero: it computes low-precision approximations of all the square roots to be taken, chooses an auxiliary real vector t if needed, and returns 1 on success. It returns 0 if no suitable t is found, which should happen only with negligible probability. Inexact input gives correct but possibly useless results.
distances holds nb vectors of length 2^g from acb_theta_eld_distances. With all nonzero, the values \widetilde{\theta}_{a,b}(z,\tau) for all characteristics are prepared, otherwise only \widetilde{\theta}_{a,0}. The vectors rts, rts_all, t and easy_steps must be allocated with lengths 2^g \cdot 3 \cdot \mathit{nb} \cdot \mathit{nb\_steps}, 2^{2g} \cdot \mathit{nb} (used only if all is set), g and nb.
Starting at a very low precision (such as 8 bits):
- For each z, approximations of \widetilde{\theta}_{a,b}(z,\tau) (stored in
rts_all) or \widetilde{\theta}_{a,0}(z,\tau) (inrts) are computed by summation, with error bounds adjusted by the distances so that they likely exclude zero. If none contains zero, the last step can use the simplest duplication formula, and approximations of \widetilde{\theta}_{a,0}(2^k z, 2^k\tau) are computed for k = 1, 2, \ldots untilnb_steps- 1 or until one contains zero; the number of such easy steps is stored ineasy_steps. - If all entries of
easy_stepsequalnb_steps, this is done. Otherwise a random real vector t is chosen, and the first entry ofeasy_steps(for z = 0) is set to the minimum of all entries. - For each z with m easy steps, approximations of \widetilde{\theta}_{a,0}(2^k (z + t), 2^k\tau) and \widetilde{\theta}_{a,0}(2^k(z + 2t), 2^k\tau) are computed for m \le k <
nb_steps(only the second for k = 0, or all \widetilde{\theta}_{a,b}(z + 2t, \tau) ifallis set). If one contains zero, another t is tried, a few times. - If no suitable t was found, the precision is doubled and the process restarts from step 1, up to precision
prec.
Finally guard is set to the number of bits expected to be lost in the duplication steps.
Guides#
The FLINT team, “acb_theta_ql_setup (acb_theta.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acb_theta/acb_theta_ql_setup.html (generated 2026-10-20).
@misc{flint-doc-acb-theta-acb-theta-ql-setup,
author = {{The FLINT team}},
title = {{acb\_theta\_ql\_setup (acb\_theta.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/acb_theta/acb_theta_ql_setup.html},
note = {Generated 2026-10-20}
}