acb_dirichlet_l_si
#include <flint/acb_dirichlet.h>void acb_dirichlet_l_si(acb_t res, slong s, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)sourceSets res to for an integer , using closed forms where they exist. An imprimitive character is reduced to the primitive character modulo inducing it, using , and gives the Riemann zeta function. For primitive modulo with parity ():
- If , then in terms of a generalized Bernoulli number, which is zero unless . (The functional equation and the Euler product are used instead when is large compared to the precision.)
If and , then
where is the Gauss sum (the Euler product is used instead for large compared to the precision). The generalized Bernoulli number is computed with exact integer arithmetic grouped by the classes of residues with the same character value, so that only roots of unity are needed; at high precision the cost is dominated by the Gauss sum, i.e. by about multiplications.
- If and is even, then , computed with one logarithm per class of residues with the same character value (a single logarithm for real ).
- Otherwise ( and , where no closed form is known), the algorithm is chosen among the Euler product (for large compared to the precision), Catalan's constant (
arb_const_catalan, for , ),acb_dirichlet_l_ui_borwein_bsplit(at high precision, for moderate ), the approximate functional equation (acb_dirichlet_l_fmpq_afe, for larger ) and the Hurwitz zeta function.
The FLINT team, “acb_dirichlet_l_si (acb_dirichlet.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acb_dirichlet/acb_dirichlet_l_si.html (generated 2026-11-02).
@misc{flint-doc-acb-dirichlet-acb-dirichlet-l-si,
author = {{The FLINT team}},
title = {{acb\_dirichlet\_l\_si (acb\_dirichlet.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/acb_dirichlet/acb_dirichlet_l_si.html},
note = {Generated 2026-11-02}
}