FLINT3.7.0-dev

_acb_dirichlet_l_fmpq_use_afe, _acb_dirichlet_l_jet_use_afe

Synopsis#include <flint/acb_dirichlet.h>
int _acb_dirichlet_l_fmpq_use_afe(ulong q, const fmpq_t s, slong prec)source
int _acb_dirichlet_l_jet_use_afe(ulong q, const fmpq_t s, int deflate, slong len, slong prec)source

Return whether the approximate functional equation is estimated to be faster than the generic algorithms for L(s,χ)L(s,\chi), respectively for its expansion to length len, where qq is the conductor of χ\chi (q=1q = 1 for the Riemann zeta function). These are the heuristics used by acb_dirichlet_l, acb_dirichlet_l_fmpq, acb_dirichlet_l_jet, acb_dirichlet_zeta and acb_dirichlet_zeta_jet (and therefore by acb_dirichlet_stieltjes and arb_const_glaisher, which call acb_dirichlet_zeta_jet). The cutoffs come from timings (wall time) with 1 and 8 threads. They decrease with qq (for q>50q > 50, values at half-integers, and for q>200q > 200, jets, always use the approximate functional equation), and with the number of threads TT (flint_get_num_threads), since the terms of the approximate functional equation are computed in parallel with nearly perfect speedup while Euler–Maclaurin summation and the Hurwitz zeta functions gain less from threads. For q=1q = 1 they are about 4⋅104T−1/24 \cdot 10^4 T^{-1/2} bits for ζ(1/2)\zeta(1/2), 105T−0.910^5 T^{-0.9} bits for other values, 1.5⋅105T−11.5 \cdot 10^5 T^{-1} bits for jets at s=1/2s = 1/2 and 4.4⋅105T−0.84.4 \cdot 10^5 T^{-0.8} bits for other jets of length 2 (somewhat higher for longer jets), the latter capped at 3.5⋅1053.5 \cdot 10^5 bits because of the O(p2)O(p^2) memory of Euler–Maclaurin summation (4 GB at 3.3⋅1053.3 \cdot 10^5 bits). The choice of algorithm, and hence the radius of the output, can therefore depend on the number of threads.

Cite this page

The FLINT team, “_acb_dirichlet_l_fmpq_use_afe, _acb_dirichlet_l_jet_use_afe (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_fmpq_use_afe.html (generated 2026-11-02).