acb_modular_theta_sum
#include <flint/acb_modular.h>void acb_modular_theta_sum(acb_ptr theta1, acb_ptr theta2, acb_ptr theta3, acb_ptr theta4, const acb_t w, int w_is_unit, const acb_t q, slong len, slong prec)sourceSets the outputs to the first len Taylor coefficients of , , and , given and , by summing truncated theta series with a rigorous bound for the tail. A nonzero w_is_unit asserts that (real ). Aliasing between inputs and outputs is not allowed.
The factor is left out of and because it often cancels in quotients; the caller computes and and multiplies it back. The function is meant for , after a modular transformation; it accepts any but returns useless enclosures when the series does not converge quickly.
The four series are summed together. For the exponents of are (squares and pronic numbers interleaved), alternately for and , and the exponents of are :
The powers of are computed with the addition sequence of acb_modular_addseq_theta. Writing the even cosine terms as , the odd cosine terms as and the sine terms as , only even powers of and are needed. The truncation bound is given in Genus 1.
The FLINT team, “acb_modular_theta_sum (acb_modular.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acb_modular/acb_modular_theta_sum.html (generated 2026-11-02).
@misc{flint-doc-acb-modular-acb-modular-theta-sum,
author = {{The FLINT team}},
title = {{acb\_modular\_theta\_sum (acb\_modular.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/acb_modular/acb_modular_theta_sum.html},
note = {Generated 2026-11-02}
}