FLINT3.7.0-dev

acb_theta_ql_setup

Synopsis#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)source

Prepares 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):

  1. For each z, approximations of \widetilde{\theta}_{a,b}(z,\tau) (stored in rts_all) or \widetilde{\theta}_{a,0}(z,\tau) (in rts) 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 until nb_steps - 1 or until one contains zero; the number of such easy steps is stored in easy_steps.
  2. If all entries of easy_steps equal nb_steps, this is done. Otherwise a random real vector t is chosen, and the first entry of easy_steps (for z = 0) is set to the minimum of all entries.
  3. 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) if all is set). If one contains zero, another t is tried, a few times.
  4. 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#

Cite this page

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