FLINT3.7.0-dev

acb_dirichlet_l_si

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

Sets res to L(s,χ)L(s,\chi) for an integer ss, using closed forms where they exist. An imprimitive character is reduced to the primitive character χ0\chi_0 modulo q0q_0 inducing it, using L(s,χ)=L(s,χ0)∏p∣q(1−χ0(p)p−s)L(s,\chi) = L(s,\chi_0) \prod_{p \mid q} (1 - \chi_0(p) p^{-s}), and q0=1q_0 = 1 gives the Riemann zeta function. For primitive χ\chi modulo q>1q > 1 with parity δ\delta (χ(−1)=(−1)δ\chi(-1) = (-1)^{\delta}):

  • If s=1−n≤0s = 1 - n \le 0, then L(s,χ)=−Bn,χ/nL(s,\chi) = -B_{n,\chi}/n in terms of a generalized Bernoulli number, which is zero unless n≡δ(mod2)n \equiv \delta \pmod 2. (The functional equation and the Euler product are used instead when nn is large compared to the precision.)
  • If s≥1s \ge 1 and s≡δ(mod2)s \equiv \delta \pmod 2, then

    L(s,χ)=(−1)1+(s−δ)/2τ(χ)2iδ(2πq)sBs,χˉs!L(s,\chi) = (-1)^{1 + (s - \delta)/2} \frac{\tau(\chi)}{2 i^{\delta}} \left(\frac{2 \pi}{q}\right)^s \frac{B_{s,\bar \chi}}{s!}

    where τ(χ)\tau(\chi) is the Gauss sum (the Euler product is used instead for ss large compared to the precision). The generalized Bernoulli number Bs,χˉ=qs−1∑a=1qχˉ(a)Bs(a/q)B_{s,\bar\chi} = q^{s-1} \sum_{a=1}^{q} \bar\chi(a) B_s(a/q) is computed with exact integer arithmetic grouped by the classes of residues with the same character value, so that only ord⁡(χ)\operatorname{ord}(\chi) roots of unity are needed; at high precision the cost is dominated by the Gauss sum, i.e. by about qq multiplications.

  • If s=1s = 1 and χ\chi is even, then L(1,χ)=−(τ(χ)/q)∑a=1q−1χˉ(a)log⁡∣2sin⁡(πa/q)∣L(1,\chi) = -(\tau(\chi)/q) \sum_{a=1}^{q-1} \bar\chi(a) \log|2 \sin(\pi a/q)|, computed with one logarithm per class of residues with the same character value (a single logarithm for real χ\chi).
  • Otherwise (s≥2s \ge 2 and s≢δ(mod2)s \not\equiv \delta \pmod 2, where no closed form is known), the algorithm is chosen among the Euler product (for ss large compared to the precision), Catalan's constant (arb_const_catalan, for q=4q = 4, s=2s = 2), acb_dirichlet_l_ui_borwein_bsplit (at high precision, for moderate qq), the approximate functional equation (acb_dirichlet_l_fmpq_afe, for larger qq) and the Hurwitz zeta function.
Cite this page

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