FLINT3.7.0-dev
Module · 149 functions

acb_dirichlet.h

#include <flint/acb_dirichlet.h>

This module evaluates Dirichlet L-functions

L(s,χ)=∑k=1∞χ(k)ks,Re⁡(s)>1,L(s,\chi) = \sum_{k=1}^\infty \frac{\chi(k)}{k^s}, \qquad \operatorname{Re}(s) > 1,

and their analytic continuations, where χ\chi is a Dirichlet character of the dirichlet module, together with the special cases and relatives of L(s,χ)L(s, \chi): the Riemann zeta function (the trivial character), the Hurwitz zeta function ζ(s,a)\zeta(s, a), the Lerch transcendent and the Stieltjes constants. It also computes Gauss and Jacobi sums and theta series of characters, discrete Fourier transforms on groups of characters, the Hardy Z-function, and the nontrivial zeros of ζ(s)\zeta(s): counting them with Turing's method, isolating and refining them by the Riemann–Siegel formula, or many at a time at large height by Platt's method. All results are rigorous enclosures.

acb_zeta and acb_hurwitz_zeta of the acb module call acb_dirichlet_zeta and acb_dirichlet_hurwitz. The Euler–Maclaurin summation behind the Hurwitz zeta function is _acb_poly_zeta_cpx_series of acb_poly, and polylogarithms are acb_polylog. The methods are described in Zeta functions, polylogarithms and L-functions and Zeros of the Riemann zeta function, and the tutorial The Riemann zeta function, its zeros and L-functions computes zeros and L-function values in complete programs.

Conventions#

  • A character is given by a group G (the characters modulo qq) and an element chi of dirichlet_char_t, or by its Conrey number; see dirichlet and Dirichlet characters. Functions that accept G = chi = NULL then use the trivial character modulo 1, that is, the Riemann zeta function. This is the case for acb_dirichlet_l, acb_dirichlet_l_jet, acb_dirichlet_l_fmpq and the Hardy Z-functions.
  • The parity of χ\chi is δ=0\delta = 0 if χ(−1)=1\chi(-1) = 1 and δ=1\delta = 1 if χ(−1)=−1\chi(-1) = -1, and χ‾\overline{\chi} is the conjugate character.
  • Power series in ss ("jets") are written as vectors of Taylor coefficients: entry kk of the output of acb_dirichlet_zeta_jet is ζ(k)(s)/k!\zeta^{(k)}(s)/k!.
  • Outputs may alias inputs unless stated otherwise.

Roots of unity#

Precomputed data for evaluating the roots of unity e2πik/ne^{2\pi i k/n} of a fixed order nn, as used for character values.

Initialise t for the roots of unity of order nn = order, optimised for num evaluations at precision prec, and free it.

More

Sets z to e2πin/ordere^{2\pi i n / \text{order}}.

Character values#

void acb_dirichlet_chi(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi, ulong n, slong prec)

Sets res to χ(n)\chi(n), which is 0 if gcd⁡(n,q)>1\gcd(n, q) > 1 and a root of unity otherwise.

Sets v to (χ(0),χ(1),…,χ(nv−1))(\chi(0), \chi(1), \ldots, \chi(\text{nv} - 1)), sharing the powers of one root of unity.

Set res to the value χq(m,n)\chi_q(m, n) of the Conrey pairing, that is, the value at nn of the character with Conrey number mm; the second form takes the two characters as input.

Gauss and Jacobi sums#

Set res to the Gauss sum Gq(χ)=∑x mod qχ(x)e2πix/qG_q(\chi) = \sum_{x \bmod q} \chi(x) e^{2\pi i x/q}. The naive version sums the definition; factor writes the sum as a product of local Gauss sums by the Chinese remainder theorem; order2 assumes that χ\chi is real and primitive and returns iδqi^\delta \sqrt{q}; theta assumes that χ\chi is primitive and obtains the sum from the functional equation of the theta series at t=1t = 1. The default version reduces an imprimitive character to the primitive one inducing it and then chooses among the methods.

More

Set res to the Jacobi sum Jq(χ1,χ2)=∑x mod qχ1(x)χ2(1−x)J_q(\chi_1, \chi_2) = \sum_{x \bmod q} \chi_1(x) \chi_2(1-x). The naive version sums the definition; factor writes it as a product of local Jacobi sums; gauss assumes that χ1χ2\chi_1 \chi_2 is primitive and uses Jq(χ1,χ2)Gq(χ1χ2)=Gq(χ1)Gq(χ2)J_q(\chi_1, \chi_2) G_q(\chi_1\chi_2) = G_q(\chi_1) G_q(\chi_2). The default version handles trivial and inverse pairs by closed formulas (and returns 0 for even qq) and otherwise chooses among the methods. The ui version takes the Conrey numbers aa and bb.

Theta series#

The theta series of a character χ\chi modulo qq with parity δ\delta is

Θq(χ,t)=∑n∈Zχ(n)nδe−πn2t2/q,t>0.\Theta_q(\chi, t) = \sum_{n \in \mathbb{Z}} \chi(n) n^\delta e^{-\pi n^2 t^2 / q}, \qquad t > 0.

For primitive χ\chi it satisfies t1/2+δ Θq(χ,t)=ϵ(χ) Θq(χ‾,1/t)t^{1/2+\delta} \, \Theta_q(\chi, t) = \epsilon(\chi) \, \Theta_q(\overline{\chi}, 1/t), where ϵ(χ)\epsilon(\chi) is the root number, which gives the Gauss sum and the root number from Θq(χ,1)\Theta_q(\chi, 1).

void acb_dirichlet_theta_arb(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi, const arb_t t, slong prec)
void acb_dirichlet_ui_theta_arb(acb_t res, const dirichlet_group_t G, ulong a, const arb_t t, slong prec)

Set res to Θq(χ,t)\Theta_q(\chi, t) for real t>0t > 0; the ui version takes the Conrey number aa. The series converges quickly only for tt not too small; for t<1t < 1 the caller should use the functional equation above, which is not applied automatically (to avoid recomputing the Gauss sum).

More

Return a number of terms NN such that the tail of the theta series of modulus qq at tt is less than 2−prec2^{-\text{prec}}. The first version uses a lower bound for tt.

void acb_dirichlet_qseries_arb_powers_naive(acb_t res, const arb_t x, int parity, const ulong * a, const acb_dirichlet_roots_t z, slong len, slong prec)
void acb_dirichlet_qseries_arb_powers_smallorder(acb_t res, const arb_t x, int parity, const ulong * a, const acb_dirichlet_roots_t z, slong len, slong prec)

Set res to ∑n<lennpzanxn2\sum_{n<\text{len}} n^p z^{a_n} x^{n^2}, where pp is parity (0 or 1), zz is the root of unity of z, and the exponents ana_n are given (with a special value for χ(n)=0\chi(n) = 0, as produced by dirichlet_chi_vec_order). The naive version sums the series as written; the smallorder version sums it in the quotient ring by the cyclotomic polynomial and evaluates at the root of unity only at the end, ignoring z except for its order.

void acb_dirichlet_qseries_arb(acb_t res, acb_srcptr a, const arb_t x, slong len, slong prec)

Sets res to ∑k=1len−1akxk2\sum_{k=1}^{\text{len}-1} a_k x^{k^2} (the entry a0a_0 is ignored), computing xk2x^{k^2} by two multiplications per term.

Sets v to (xk2)0≤k<nv(x^{k^2})_{0 \le k < \text{nv}}.

void acb_dirichlet_vec_mellin_arb(acb_ptr res, const dirichlet_group_t G, const dirichlet_char_t chi, slong len, const arb_t t, slong n, slong prec)

Sets res[k], for 0≤k<n0 \le k < n, to tk/2∑m=1len−1χ(m)mδe−πm2t2k/qt^{k/2} \sum_{m=1}^{\text{len}-1} \chi(m) m^\delta e^{-\pi m^2 t^{2k}/q} (half the theta series at the geometric sequence tkt^k, scaled), with the tail bound for the truncation after len terms. These are samples for computing the Mellin transform of the theta series.

Power sums#

void acb_dirichlet_powsum_term(acb_ptr res, arb_t log_prev, ulong * prev, const acb_t s, ulong k, int integer, int critical_line, slong len, slong prec)

Sets res to k−(s+x)k^{-(s+x)} as a power series in xx of length len. The flags integer and critical_line select optimisations for integer ss and for Re⁡(s)=1/2\operatorname{Re}(s) = 1/2.

More
void acb_dirichlet_powsum_sieved(acb_ptr z, const acb_t s, ulong n, slong len, slong prec)

Sets z to ∑k=1nk−(s+x)\sum_{k=1}^n k^{-(s+x)} as a power series in xx of length len. Powers of composite k=ijk = ij are computed as i−sj−si^{-s} j^{-s} from a table, and the even terms are grouped as a polynomial in 2−(s+x)2^{-(s+x)}. This needs about n/log⁡nn / \log n powers, n/2n/2 multiplications and storage for n/6n/6 power series, so it is only faster than the naive sum for small len.

void acb_dirichlet_powsum_smooth(acb_ptr z, const acb_t s, ulong n, slong len, slong prec)

Sets z to ∑k=1nk−(s+x)\sum_{k=1}^n k^{-(s+x)} as a power series in xx of length len, by partial sieving that adds the multiples of 5-smooth numbers into separate buckets. It computes about 4/154/15 of the powers, more than acb_dirichlet_powsum_sieved, but needs only logarithmic extra space and is faster for large len, since power series multiplications are replaced by additions.

The Riemann zeta function#

void acb_dirichlet_zeta(acb_t res, const acb_t s, slong prec)

Sets res to ζ(s)\zeta(s), choosing the algorithm from ss and prec: exact values at integers (Bernoulli numbers for negative integers, arb_zeta_ui for positive ones), the Riemann–Siegel formula for ∣Im⁡(s)∣≥24 p3/2|\operatorname{Im}(s)| \ge 24 \, p^{3/2} and ∣Re⁡(s)∣≤10+p/10|\operatorname{Re}(s)| \le 10 + p/10 at precision pp, the approximate functional equation (acb_dirichlet_l_fmpq_afe_jet) when ss is an exact real number which is a rational number of small height (in practice a dyadic number such as 1/21/2 or −3/4-3/4) and the precision is high enough for this to be faster, and Euler–Maclaurin summation otherwise, after the reflection formula for Re⁡(s)<0\operatorname{Re}(s) < 0. The result is indeterminate if ss contains the pole s=1s = 1.

void acb_dirichlet_zeta_jet(acb_t res, const acb_t s, int deflate, slong len, slong prec)

Sets res (a vector of length len) to the Taylor coefficients of ζ(s+x)\zeta(s + x), or of the deflated function ζ(s+x)−1/(s+x−1)\zeta(s + x) - 1/(s + x - 1) if deflate is nonzero. Euler–Maclaurin summation is used (after the reflection formula when Re⁡(s)≤−4\operatorname{Re}(s) \le -4, or ≤−2.5\le -2.5 at precision below 128 bits; for larger negative Re⁡(s)\operatorname{Re}(s) it is cheaper and loses fewer bits to sum directly at ss, with guard bits proportional to −Re⁡(s)log⁡2p-\operatorname{Re}(s) \log_2 p), the Riemann–Siegel formula for len ≤2\le 2 high on the critical line, or, for an exact rational number ss of small height (including integers) at very high precision, the approximate functional equation (acb_dirichlet_l_fmpq_afe_jet), whose cost is O~(p1.5)\tilde O(p^{1.5}) instead of O~(p2)\tilde O(p^2) and which needs far less memory.

Sets res to an upper bound for ∣ζ(s)∣|\zeta(s)|, computed quickly: in and slightly around the critical strip by formula (43.3) of [Rad1973], to the right by the value at Re⁡(s)\operatorname{Re}(s), and to the left by the functional equation.

Sets der1 and der2 to upper bounds for ∣ζ′(s)∣|\zeta'(s)| and ∣ζ′′(s)∣|\zeta''(s)|, meant for the critical strip. The bounds are not tight.

void acb_dirichlet_eta(acb_t res, const acb_t s, slong prec)

Sets res to the Dirichlet eta function η(s)=∑k=1∞(−1)k+1k−s=(1−21−s)ζ(s)\eta(s) = \sum_{k=1}^{\infty} (-1)^{k+1} k^{-s} = (1-2^{1-s}) \zeta(s) (the alternating character is not a Dirichlet character). The removable singularity at s=1s = 1, where η(1)=log⁡2\eta(1) = \log 2, is handled.

void acb_dirichlet_xi(acb_t res, const acb_t s, slong prec)

Sets res to the Riemann xi function ξ(s)=12s(s−1)π−s/2Γ(s2)ζ(s)\xi(s) = \frac{1}{2} s (s-1) \pi^{-s/2} \Gamma(\tfrac{s}{2}) \zeta(s), which satisfies ξ(1−s)=ξ(s)\xi(1-s) = \xi(s).

The Riemann–Siegel formula#

The Riemann–Siegel formula is implemented following Arias de Reyna [Ari2011]. For s=σ+its = \sigma + it with t>0t > 0,

ζ(s)=R(s)+X(s)R‾(1−s),X(s)=πs−1/2Γ((1−s)/2)Γ(s/2),\zeta(s) = \mathcal{R}(s) + X(s) \overline{\mathcal{R}}(1-s), \qquad X(s) = \pi^{s-1/2} \frac{\Gamma((1-s)/2)}{\Gamma(s/2)},
R(s)=∑k=1N1ks+(−1)N−1Ua−σ[∑k=0KCk(p)ak+RSK],\mathcal{R}(s) = \sum_{k=1}^N \frac{1}{k^s} + (-1)^{N-1} U a^{-\sigma} \left[ \sum_{k=0}^K \frac{C_k(p)}{a^k} + RS_K \right],

where U=exp⁡(−i[t2log⁡(t2π)−t2−π8])U = \exp(-i[\frac{t}{2} \log(\frac{t}{2\pi})-\frac{t}{2}-\frac{\pi}{8}]), a=t/(2π)a = \sqrt{t/(2\pi)}, N=⌊a⌋N = \lfloor a \rfloor and p=1−2(a−N)p = 1-2(a-N). The coefficients Ck(p)C_k(p) are expressed through auxiliary coefficients dj(k)d_j^{(k)} and the derivatives F(j)(p)F^{(j)}(p). The cost is O(t)O(\sqrt{t}) terms, against O(t)O(t) for Euler–Maclaurin summation; see The Riemann–Siegel formula. Because of artificial discontinuities, ss should be exact inside the evaluation; inexact input is handled by bounding the derivative.

If nonzero (the default), the main sum of the Riemann–Siegel formula is computed with dfloat_powsum_sieved (double-word arithmetic, see dfloat) when that gives enough accuracy. Set it to 0 to always use acb_dirichlet_powsum_sieved. This is a global variable, which should not be changed while other threads evaluate zeta.

Sets c to F(j)(p)F^{(j)}(p) for 0≤j<N0 \le j < N, by power series division. This breaks down at p=±1/2p = \pm 1/2, which does not occur for exact ss.

Updates d in place from dj(k−1)d_j^{(k-1)} to dj(k)d_j^{(k)} for 0≤j≤⌊3k/2⌋+10 \le j \le \lfloor 3k/2 \rfloor + 1 (for k=0k = 0, initialises it).

Sets err to a bound for the error term RSKRS_K, by Theorem 4.2 of [Ari2011].

void acb_dirichlet_zeta_rs_r(acb_t res, const acb_t s, slong K, slong prec)

Sets res to R(s)\mathcal{R}(s) for ss in the upper half-plane, with exactly KK asymptotic terms if K>0K > 0 and an automatic choice otherwise.

More
void acb_dirichlet_zeta_rs(acb_t res, const acb_t s, slong K, slong prec)

Sets res to ζ(s)\zeta(s) by the Riemann–Siegel formula, with exactly KK asymptotic terms if K>0K > 0 and an automatic choice otherwise.

void acb_dirichlet_zeta_jet_rs(acb_ptr res, const acb_t s, slong len, slong prec)

Sets res to the first len Taylor coefficients of ζ\zeta at ss by the Riemann–Siegel formula. Only len ≤2\le 2 is supported; the derivative is computed with a finite difference.

The Hurwitz zeta function#

void acb_dirichlet_hurwitz(acb_t res, const acb_t s, const acb_t a, slong prec)

Sets res to the Hurwitz zeta function ζ(s,a)=∑k=0∞(k+a)−s\zeta(s, a) = \sum_{k=0}^{\infty} (k + a)^{-s}, analytically continued. The case a=1a = 1 calls acb_dirichlet_zeta, and s=0s = 0 and small negative integers ss use Bernoulli polynomials; otherwise Euler–Maclaurin summation is used (_acb_poly_zeta_cpx_series). The result is indeterminate if ss contains 1.

Precomputed data for evaluating ζ(s,a)\zeta(s, a) at many a∈(0,1]a \in (0, 1] for a fixed ss.

Precomputes a grid of NN Taylor polynomials of length KK for ζ(s,a+A)\zeta(s, a + A), for fast evaluation of ζ(s,a)\zeta(s, a) at a∈(0,1]a \in (0,1] with fixed ss. This costs NKNK Hurwitz zeta values; each later evaluation costs 2K2K arithmetic operations plus AA powers, with a truncation error O(1/(2AN)K)O(1/(2AN)^K). With deflate nonzero, the deflated function (without the pole at s=1s = 1) is used.

More
void acb_dirichlet_hurwitz_precomp_init_num(acb_dirichlet_hurwitz_precomp_t pre, const acb_t s, int deflate, double num_eval, slong prec)
void acb_dirichlet_hurwitz_precomp_choose_param(ulong * A, ulong * K, ulong * N, const acb_t s, double num_eval, slong prec)

Choose AA, KK and NN to minimise the cost of num_eval evaluations at ss and precision prec, and (for the first function) initialise pre with them. If evaluating each value from scratch is estimated to be cheaper, A=K=N=0A = K = N = 0.

Sets res to a bound for the truncation error (not including rounding errors) of the evaluation of ζ(s,a)\zeta(s, a) with parameters AA, KK, NN, for 0<a≤10 < a \le 1.

Sets res to ζ(s,p/q)\zeta(s, p/q) using the precomputed data, for 0<p/q≤10 < p/q \le 1. Throws an exception if p>qp > q.

The Lerch transcendent#

void acb_dirichlet_lerch_phi(acb_t res, const acb_t z, const acb_t s, const acb_t a, slong prec)
void acb_dirichlet_lerch_phi_direct(acb_t res, const acb_t z, const acb_t s, const acb_t a, slong prec)
void acb_dirichlet_lerch_phi_integral(acb_t res, const acb_t z, const acb_t s, const acb_t a, slong prec)

Set res to the Lerch transcendent Φ(z,s,a)=∑k=0∞zk(k+a)−s\Phi(z,s,a) = \sum_{k=0}^{\infty} z^k (k+a)^{-s}, analytically continued to ∣z∣≥1|z| \ge 1. The direct version sums the truncated series; the integral version uses a Hankel contour integral; the default version checks special cases that reduce to the Hurwitz zeta function or polylogarithms and otherwise chooses between the two.

More

Stieltjes constants#

void acb_dirichlet_stieltjes(acb_t res, const fmpz_t n, const acb_t a, slong prec)

Sets res to the generalised Stieltjes constant γn(a)\gamma_n(a) for an integer n≥0n \ge 0 (an exception is thrown for n<0n < 0), the coefficient in the Laurent series ζ(s,a)=1s−1+∑n=0∞(−1)nn!γn(a)(s−1)n\zeta(s,a) = \frac{1}{s-1} + \sum_{n=0}^\infty \frac{(-1)^n}{n!} \gamma_n(a) (s-1)^n. With a=1a = 1 these are the ordinary Stieltjes constants.

More

Dirichlet L-functions#

For a primitive character χ\chi of conductor qq and parity δ\delta, L(s,χ)L(s, \chi) satisfies the functional equation

(qπ)s+δ2Γ(s+δ2)L(s,χ)=ϵ(χ)(qπ)1−s+δ2Γ(1−s+δ2)L(1−s,χ‾)\left(\frac{q}{\pi}\right)^{\frac{s+\delta}2}\Gamma\left(\frac{s+\delta}2\right) L(s, \chi) = \epsilon(\chi) \left(\frac{q}{\pi}\right)^{\frac{1-s+\delta}2}\Gamma\left(\frac{1-s+\delta}2\right) L(1 - s, \overline\chi)

with the root number ∣ϵ(χ)∣=1|\epsilon(\chi)| = 1.

Set res to the root number ϵ(χ)\epsilon(\chi) of a primitive character. The theta version uses ϵ(χ)=Θq(χ,1)/Θq(χ,1)‾\epsilon(\chi) = \Theta_q(\chi, 1) / \overline{\Theta_q(\chi, 1)}; the default version uses the Gauss sum, ϵ(χ)=Gq(χ)/(iδq)\epsilon(\chi) = G_q(\chi)/(i^\delta \sqrt q), when qq has several prime factors, and the theta series otherwise. The default version throws an exception if χ\chi is not primitive.

Full documentation
void acb_dirichlet_l(acb_t res, const acb_t s, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)
void _acb_dirichlet_l_generic(acb_t res, const acb_t s, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)

Sets res to L(s,χ)L(s,\chi), choosing the algorithm. If ss is an exact integer, acb_dirichlet_l_si is used. If ss is an exact real number which is a rational number of small height (see _acb_dirichlet_get_small_fmpq), the approximate functional equation acb_dirichlet_l_fmpq_afe_jet is used when _acb_dirichlet_l_fmpq_use_afe estimates it to be faster (at high precision or for large conductor). Otherwise (and always in the underscore version): the Riemann zeta function for q=1q = 1, the functional equation for primitive χ\chi and Re⁡(s)<−1/2\operatorname{Re}(s) < -1/2 (or near s=0s = 0 for even χ\chi), the Euler product for large Re⁡(s)\operatorname{Re}(s), and otherwise the decomposition into Hurwitz zeta functions with a precomputation shared by the ϕ(q)\phi(q) values.

Full documentation
void acb_dirichlet_l_si(acb_t res, slong s, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)

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.

Sets res to L(s,χ)L(s,\chi) for an integer s≥1s \ge 1 and a primitive character χ\chi modulo qq (with G = NULL for q=1q = 1), using a generalization of Borwein's algorithm for the Riemann zeta function (arb_zeta_ui_borwein_bsplit) with binary splitting, which costs O~(ϕ(q)p)\tilde O(\phi(q) p) at precision pp.

If 4∣q4 \mid q, the 2-component of χ\chi is primitive, which implies that χ(n+Q)=−χ(n)\chi(n + Q) = -\chi(n) with Q=q/2Q = q/2; if qq is odd, we instead use ∑n(−1)n−1χ(n)n−s=(1−χ(2)21−s)L(s,χ)\sum_n (-1)^{n-1} \chi(n) n^{-s} = (1 - \chi(2) 2^{1-s}) L(s,\chi) with Q=qQ = q. In both cases, L(s,χ)L(s,\chi) is a linear combination over the residues aa modulo QQ of alternating series ∑j≥0(−1)j(Qj+a)−s\sum_{j \ge 0} (-1)^j (Q j + a)^{-s}, whose terms are moments of a positive measure on [0,1][0,1] with total mass a−sa^{-s}. Borwein's acceleration with nn terms therefore has error at most 3a−s/(3+8)n3 a^{-s} / (3+\sqrt{8})^n for each series. The series are evaluated together by one binary splitting over vectors (several in parallel when threads are available), and the character values only enter in the final linear combination.

The output is indeterminate if the character is not primitive, if q≡2(mod4)q \equiv 2 \pmod 4 (there are then no primitive characters), and if s=1s = 1, qq is odd and χ(2)=1\chi(2) = 1 (when the factor 1−χ(2)21−s1 - \chi(2) 2^{1-s} vanishes).

Sets res to L(s,χ)=q−s∑k=1qχ(k)ζ(s,k/q)L(s,\chi) = q^{-s}\sum_{k=1}^q \chi(k) \zeta(s, k/q). For s=1s = 1 and non-principal χ\chi, the deflated Hurwitz zeta function is used to avoid the poles. If precomp is NULL, each Hurwitz zeta value is computed directly; otherwise the precomputation is used.

void _acb_dirichlet_euler_product_real_ui(arb_t res, ulong s, const signed char * chi, int mod, int reciprocal, slong prec)

Set res to L(s,χ)L(s,\chi) by the Euler product, which is efficient for large Re⁡(s)\operatorname{Re}(s); the result is finite only if Re⁡(s)≥2\operatorname{Re}(s) \ge 2. The underscore version takes an integer ss and a real character given by the list chi of its values at 0,…,mod−10, \ldots, \text{mod}-1, and computes 1/L(s,χ)1/L(s, \chi) if reciprocal is nonzero.

More
void acb_dirichlet_l_fmpq(acb_t res, const fmpq_t s, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)
void acb_dirichlet_l_fmpq_afe(acb_t res, const fmpq_t s, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)

Set res to L(s,χ)L(s,\chi) for rational ss. The afe version uses the approximate functional equation, a rapidly convergent series of incomplete gamma functions (evaluated by binary splitting and the bit-burst algorithm), which is fastest at very high precision or large modulus; the default version uses acb_dirichlet_l_si when ss is an integer, the approximate functional equation when this is estimated to be faster, and otherwise calls _acb_dirichlet_l_generic. Imprimitive characters are reduced to the primitive characters inducing them, as in acb_dirichlet_l_fmpq_afe_jet.

int _acb_dirichlet_l_jet_use_afe(ulong q, const fmpq_t s, int deflate, slong len, slong prec)

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.

If ss is an exact real number equal to a rational number with numerator of at most 40 bits and denominator of at most 20 bits (i.e. a dyadic number m2−em 2^{-e} with e≤20e \le 20), sets xx to it and returns 1; otherwise returns 0.

void acb_dirichlet_l_fmpq_afe_jet(acb_ptr res, const fmpq_t s, const dirichlet_group_t G, const dirichlet_char_t chi, int deflate, slong len, slong prec)

Sets res to the Taylor coefficients L(s),L′(s),…,L(len−1)(s)/(len−1)!L(s), L'(s), \ldots, L^{(\text{len}-1)}(s)/(\text{len}-1)! for rational ss, with deflate as in acb_dirichlet_l_jet. This uses the same approximate functional equation and precision management as acb_dirichlet_l_fmpq_afe, with every quantity replaced by a power series in xx where s→s+xs \to s + x. The required expansions of the incomplete gamma functions Γ(a+x/2,πn2/q)\Gamma(a + x/2, \pi n^2 / q) with respect to the parameter are computed by jet versions of the binary splitting and bit-burst algorithms (see _arb_gamma_upper_fmpq_step_bsplit_jet), with truncation errors bounded separately for each coefficient. For fixed len, the cost is O~(p1.5)\tilde O(p^{1.5}) at precision pp, roughly len times the cost of acb_dirichlet_l_fmpq_afe; this makes it possible to compute, for example, Glaisher's constant (via ζ′(−1)\zeta'(-1)), Stieltjes constants and their generalizations to Dirichlet LL-functions, or the second-order Landau-Ramanujan constant (via ζ′(s)\zeta'(s) and L′(s,χ−4)L'(s, \chi_{-4}) at s=2ks = 2^k) in quasi-p1.5p^{1.5} time. An imprimitive character χ\chi modulo qq induced by χ0\chi_0 is handled by evaluating L(s+x,χ0)L(s + x, \chi_0) and multiplying by the Euler factors ∏p∣q(1−χ0(p)p−s−x)\prod_{p \mid q} (1 - \chi_0(p) p^{-s-x}). The deflation only has an effect for q=1q = 1 (as in acb_dirichlet_zeta_jet); for the Riemann zeta function at s=1s = 1, deflate must be set, and for a principal character modulo q>1q > 1, deflate must not be set; otherwise the output is indeterminate.

The terms of the approximate functional equation are independent, and are computed in parallel when FLINT is allowed to use several threads (see flint_set_num_threads). The terms are added up in a fixed order, so the output does not depend on the number of threads. Each term is added as soon as all earlier terms are done; a term that finishes early waits in a small buffer (a few terms per thread), so the memory usage is O(t⋅len⋅p)O(t \cdot \text{len} \cdot p) bits with tt threads, independent of the number of terms O(qp)O(\sqrt{q p}). The same applies to acb_dirichlet_l_fmpq_afe, which is the case len = 1 of this function.

Sets res (of length ϕ(q)\phi(q)) to L(s,χ)L(s,\chi) for all characters χ\chi modulo qq, from the ϕ(q)\phi(q) values ζ(s,k/q)\zeta(s, k/q) and one discrete Fourier transform. The values are ordered by lexicographically ordered Conrey logarithms, as in acb_dirichlet_dft_index. If precomp is NULL, each Hurwitz zeta value is computed directly.

void acb_dirichlet_l_jet(acb_ptr res, const acb_t s, const dirichlet_group_t G, const dirichlet_char_t chi, int deflate, slong len, slong prec)

Sets res to the Taylor coefficients L(s),L′(s),…,L(len−1)(s)/(len−1)!L(s), L'(s), \ldots, L^{(\text{len}-1)}(s)/(\text{len}-1)!. With deflate nonzero and principal χ\chi, the expansion of L(s,χ)−ϕ(q)q(s−1)L(s,\chi) - \frac{\phi(q)}{q (s-1)} is computed instead, which at s=1s = 1 is the regular part of the Laurent expansion; for non-principal χ\chi, deflate has no effect. For q=1q = 1 this calls acb_dirichlet_zeta_jet. Otherwise, if ss is an exact rational number of small height (see _acb_dirichlet_get_small_fmpq), the approximate functional equation acb_dirichlet_l_fmpq_afe_jet is used when _acb_dirichlet_l_jet_use_afe estimates it to be faster (this is not done for principal characters with deflation); otherwise the Hurwitz zeta expansions are summed.

Full documentation
void _acb_dirichlet_l_series(acb_ptr res, acb_srcptr s, slong slen, const dirichlet_group_t G, const dirichlet_char_t chi, int deflate, slong len, slong prec)
void acb_dirichlet_l_series(acb_poly_t res, const acb_poly_t s, const dirichlet_group_t G, const dirichlet_char_t chi, int deflate, slong len, slong prec)

Set res to L(s(x),χ)L(s(x),\chi) truncated to length len, for a power series s(x)s(x), with deflate as in acb_dirichlet_l_jet.

Discrete Fourier transforms on characters#

The discrete Fourier transform of f:Z/qZ→Cf : \mathbb{Z}/q\mathbb{Z} \to \mathbb{C} is the function f^(χ)=∑x mod qχ(x)‾f(x)\hat f(\chi) = \sum_{x \bmod q} \overline{\chi(x)} f(x) on the characters modulo qq. Using the Conrey isomorphism between (Z/qZ)×(\mathbb{Z}/q\mathbb{Z})^\times and its dual, it is computed as g(a)=∑b mod qχq(a,b)‾f(b)g(a) = \sum_{b \bmod q} \overline{\chi_q(a,b)} f(b). Both functions are thin wrappers around gr_dft_acb_dirichlet_index and gr_dft_acb_dirichlet of gr_dft, which compute a product DFT over the cyclic components of the group in fixed-point arithmetic with rigorous error bounds.

Sets w to the DFT of v, both vectors of length ϕ(q)\phi(q) indexed by the lexicographically ordered Conrey logarithms (the order of dirichlet_char_next and dirichlet_char_index).

More

Sets w to the DFT of v, both vectors of length qq indexed by Conrey numbers. The entries at indices not coprime to qq are ignored.

Hardy Z-functions#

For a primitive character χ\chi (or for ζ\zeta, with G and chi NULL), the Hardy Z-function is Z(t)=eiθ(t)L(1/2+it,χ)Z(t) = e^{i\theta(t)} L(1/2+it, \chi), where the phase is

θ(t)=−t2log⁡(π/q)−ilog⁡(ϵ)2+log⁡Γ((s+δ)/2)−log⁡Γ((1−s+δ)/2)2i,s=12+it.\theta(t) = -\frac{t}{2} \log(\pi/q) - \frac{i \log(\epsilon)}{2} + \frac{\log \Gamma((s+\delta)/2) - \log \Gamma((1-s+\delta)/2)}{2i}, \qquad s = \tfrac12 + it.

Z(t)Z(t) is real for real tt, and its real zeros are the zeros of L(s,χ)L(s, \chi) on the critical line. The functions throw an exception if χ\chi is not primitive.

void acb_dirichlet_hardy_theta(acb_ptr res, const acb_t t, const dirichlet_group_t G, const dirichlet_char_t chi, slong len, slong prec)

Sets res to the first len Taylor coefficients of θ(t)\theta(t), using the log-gamma function.

void acb_dirichlet_hardy_z(acb_ptr res, const acb_t t, const dirichlet_group_t G, const dirichlet_char_t chi, slong len, slong prec)

Sets res to the first len Taylor coefficients of Z(t)Z(t), computed as eiθ(t)L(1/2+it,χ)e^{i\theta(t)} L(1/2 + it, \chi) with acb_dirichlet_l_jet. For the Riemann zeta function, this uses the Riemann–Siegel formula when tt is large and len ≤2\le 2. If tt is real, the imaginary parts are set to exactly zero.

Set res to θ(t(x))\theta(t(x)), respectively Z(t(x))Z(t(x)), truncated to length len, for a power series t(x)t(x) (given as s).

Gram points and counting zeros#

These functions concern the Riemann zeta function only. Let N(t)N(t) be the number of zeros of ζ(s)\zeta(s), counted with multiplicity, with 0<Im⁡(s)≤t0 < \operatorname{Im}(s) \le t, and S(t)=N(t)−θ(t)/π−1S(t) = N(t) - \theta(t)/\pi - 1. They implement Turing's method as described in Turing's method, following the implementation in mpmath [Joh2018b] by Arias de Reyna [Ari2012].

void acb_dirichlet_gram_point(arb_t res, const fmpz_t n, const dirichlet_group_t G, const dirichlet_char_t chi, slong prec)

Sets res to the nn-th Gram point gng_n, the unique solution in [7,∞)[7, \infty) of θ(gn)=πn\theta(g_n) = \pi n, for n≥−1n \ge -1. Only the Riemann zeta function is supported: G and chi must be NULL; otherwise, or for n<−1n < -1, the result is indeterminate.

Returns a number BB of consecutive good Gram blocks that suffices for Turing's method [Tur1953] with the bounds of [Leh1970], [Bre1979] and [Tru2011]: if BB consecutive Gram blocks with union [gn,gp)[g_n, g_p) satisfy Rosser's rule, then N(gn)≤n+1N(g_n) \le n + 1 and N(gp)≥p+1N(g_p) \ge p + 1.

void acb_dirichlet_zeta_nzeros(arb_t res, const arb_t t, slong prec)

Set res to N(t)N(t). For exact tt the result is an exact integer; for an inexact ball, it is the ball containing N(t1),…,N(t2)N(t_1), \ldots, N(t_2) where [t1,t2][t_1, t_2] encloses tt. The underscore version takes an exact tt and sets an integer.

Sets res to N(gn)N(g_n), for n≥−1n \ge -1.

void acb_dirichlet_backlund_s(arb_t res, const arb_t t, slong prec)

Sets res to S(t)=1πarg⁡ζ(12+it)S(t) = \frac{1}{\pi}\operatorname{arg}\zeta(\frac{1}{2} + it), where the argument is defined by continuous variation from s=2s = 2 to 2+it2 + it and then to 12+it\frac12 + it, not the principal value. It is computed as N(t)−θ(t)/π−1N(t) - \theta(t)/\pi - 1.

Sets res to an upper bound for ∣S(t)∣|S(t)|, by Theorem 1 and (1.2) of [Tru2014].

Returns S(gn)S(g_n), for n≥−1n \ge -1.

Zeros of the Riemann zeta function#

The nn-th zero of the Hardy Z-function is γn\gamma_n, where ρn=1/2+iγn\rho_n = 1/2 + i\gamma_n is the nn-th nontrivial zero of ζ(s)\zeta(s) with positive imaginary part (assuming, as verified for every nn handled by these functions, that the zeros are on the critical line and simple). Zeros of the Riemann zeta function explains the methods and gives an example.

void acb_dirichlet_hardy_z_zero(arb_t res, const fmpz_t n, slong prec)
void acb_dirichlet_hardy_z_zeros(arb_ptr res, const fmpz_t n, slong len, slong prec)

Set res to γn\gamma_n, respectively to the len consecutive values γn,…,γn+len−1\gamma_n, \ldots, \gamma_{n+\text{len}-1}, accurate to about prec bits. Throws an exception if n<1n < 1. The zeros are isolated rigorously and computed by the Riemann–Siegel method, or by Platt's method at large height when that is expected to be faster.

Full documentation
void acb_dirichlet_zeta_zero(acb_t res, const fmpz_t n, slong prec)
void acb_dirichlet_zeta_zeros(acb_ptr res, const fmpz_t n, slong len, slong prec)

Set res to ρn=1/2+iγn\rho_n = 1/2 + i\gamma_n, respectively to len consecutive zeros starting with ρn\rho_n. Requires n≥1n \ge 1.

Full documentation

The same as acb_dirichlet_hardy_z_zeros, always with the Riemann–Siegel method: isolation with Gram points and Turing's method, then refinement with _acb_dirichlet_refine_hardy_z_zero.

Returns 0 if acb_dirichlet_hardy_z_zeros uses the Riemann–Siegel method for len zeros from the nn-th at target precision prec (or at the default precision 64+⌈log⁡2n⌉64 + \lceil \log_2 n \rceil if prec is not positive), and otherwise the working precision of the large height method. The choice minimises a cost model measured with 2 threads.

More

Set (a,b)(a, b) to an interval that contains γn\gamma_n and no other zero of ZZ. The gram version uses Gram's law and requires 1≤n≤1261 \le n \le 126; the rosser version uses Rosser's rule and requires 1≤n≤139995261 \le n \le 13999526; the turing version uses Turing's method and requires n≥2n \ge 2; the default version chooses among them and requires n≥1n \ge 1.

Sets res to Z(t)Z(t), increasing the precision *pprec as needed until the sign of Z(t)Z(t) is determined, and returns the sign.

void _acb_dirichlet_refine_hardy_z_zero(arb_t res, const arf_t a, const arf_t b, slong prec)

Sets res to the unique zero of ZZ in (a,b)(a, b), to prec bits.

More

Sets res to the zero of ZZ in the ball z, which must contain exactly one zero (for example a zero computed by Platt's method), to prec bits: z rounded if it is accurate enough, otherwise the last stage of the refinement above if z is accurate to about half the precision, and the full refinement otherwise.

Platt's method for zeros at large height#

Platt's method [Pla2017] evaluates the real function Λ(t)eπt/4\Lambda(t) e^{\pi t/4}, which has the same zeros as Z(t)Z(t), on a grid of ABAB points with spacing 1/A1/A by a convolution computed with fast Fourier transforms, then interpolates between the grid points. One multi-evaluation isolates thousands of zeros; see Platt's method. The functions without underscore choose all parameters from the height and expect 104≤n<103710^4 \le n < 10^{37}; for smaller nn they return 0. They use flint_get_num_threads() threads.

Sets res to Λ(t)eπt/4\Lambda(t) e^{\pi t/4}, where Λ(t)=π−it/2Γ(1/2+it2)ζ(12+it)\Lambda(t) = \pi^{-it/2} \Gamma(\frac{1/2+it}{2}) \zeta(\frac12 + it) is defined at the beginning of §3 of [Pla2017]. By the functional equation it is real for real tt, it has the same zeros as ζ(1/2+it)\zeta(1/2 + it) [Pla2011], and the exponential factor cancels the decay of the gamma factor.

Sets res to the values of acb_dirichlet_platt_scaled_lambda at the N=ABN = AB grid points T−B/2+k/AT - B/2 + k/A, 0≤k<N0 \le k < N, by evaluating each point separately. NN must be even.

void acb_dirichlet_platt_multieval(arb_ptr out, const fmpz_t T, slong A, slong B, const arb_t h, const fmpz_t J, slong K, slong sigma, slong prec)
void acb_dirichlet_platt_multieval_threaded(arb_ptr out, const fmpz_t T, slong A, slong B, const arb_t h, const fmpz_t J, slong K, slong sigma, slong prec)

Set out to the values of acb_dirichlet_platt_scaled_lambda on the same grid as acb_dirichlet_platt_scaled_lambda_vec, all at once with discrete Fourier transforms, in the notation of [Pla2017]: hh is the width of the Gaussian, JJ the number of terms of the Dirichlet series, KK the number of Taylor terms and sigma an odd integer used in the error bounds. The threaded version uses flint_get_num_threads() threads; the default version decides whether to use threads.

More

If nonzero (the default), acb_dirichlet_platt_multieval computes the sums over jj with double-word arithmetic when the precision allows it. Set it to 0 to always use ball arithmetic.

void acb_dirichlet_platt_ws_interpolation(arb_t res, arf_t deriv, const arb_t t0, arb_srcptr p, const fmpz_t T, slong A, slong B, slong Ns_max, const arb_t H, slong sigma, slong prec)

Sets res to acb_dirichlet_platt_scaled_lambda at t0t_0, by Gaussian-windowed Whittaker–Shannon interpolation of the grid values p. If deriv is not NULL, it is set to an approximation of the derivative. Ns_max is the maximum number of grid points used on either side of t0t_0, HH is the standard deviation of the Gaussian window, and sigma is an odd positive integer used in the error bounds.

slong _acb_dirichlet_platt_local_hardy_z_zeros(arb_ptr res, const fmpz_t n, slong len, const fmpz_t T, slong A, slong B, const arb_t h, const fmpz_t J, slong K, slong sigma_grid, slong Ns_max, const arb_t H, slong sigma_interp, slong prec)

Set at most len entries of res to consecutive zeros γn,…\gamma_n, \ldots of the Hardy Z-function and return the number found. The local versions make one grid evaluation; acb_dirichlet_platt_hardy_z_zeros repeats them until len zeros are found. The parameters of the underscore version have the meanings of acb_dirichlet_platt_multieval and acb_dirichlet_platt_ws_interpolation.

slong _acb_dirichlet_platt_isolate_local_hardy_z_zeros(arf_interval_ptr res, const fmpz_t n, slong len, const fmpz_t T, slong A, slong B, const arb_t h, const fmpz_t J, slong K, slong sigma_grid, slong Ns_max, const arb_t H, slong sigma_interp, slong prec)

Like the local functions above, but set res to isolating intervals of the zeros instead of refining them.

Sets at most len entries of res to consecutive zeros ρn,…\rho_n, \ldots of ζ(s)\zeta(s) by Platt's method, and returns the number found.

The secondary zeta function#

Sets res to the secondary zeta function Z(s)=∑n=1∞γn−sZ(s) = \sum_{n=1}^{\infty} \gamma_n^{-s}, where ρn=1/2+iγn\rho_n = 1/2 + i\gamma_n runs over the zeros of ζ(s)\zeta(s) with positive imaginary part. The Riemann hypothesis is not assumed. The algorithm follows [Ari2020], with the decomposition Z(s)=A(s)−P(s)+E(s)−S(s)Z(s) = A(s) - P(s) + E(s) - S(s) depending on a parameter a>0a > 0, an improved tail bound for PP, and rigorous bounds for the tails of AA and SS that replace the heuristic bounds of [Ari2020].

Internal functions#

Sets xt to πt2/q\pi t^2 / q, the exponent of the theta series.

void _acb_dirichlet_theta_arb_series(acb_t res, const dirichlet_group_t G, const dirichlet_char_t chi, const arb_t xt, slong len, slong prec)

Sets res to ∑n=1len−1χ(n)nδxn2\sum_{n=1}^{\text{len}-1} \chi(n) n^\delta x^{n^2} for xx = xt, using acb_dirichlet_qseries_arb.

void mag_tail_kexpk2_arb(mag_t res, const arb_t a, ulong n)

Sets res to an upper bound for ∑k>nke−ak2\sum_{k > n} k e^{-a k^2}.

void acb_dirichlet_si_poly_evaluate(acb_t res, slong * v, slong len, const acb_t z, slong prec)

Sets res to the polynomial with the len coefficients v evaluated at zz, by the baby-step giant-step method.

Returns the local factor at pp (with pe∥qp^e \| q and pe =pe= p^e) of the Jacobi sum Jq(1,χ)J_q(1, \chi) for a character of conductor cond. The value is a signed integer cast to ulong.

void acb_dirichlet_platt_beta(arb_t res, const arb_t t, slong prec)

Sets res to β(t)=1/6+log⁡log⁡t/log⁡t\beta(t) = 1/6 + \log\log t / \log t, the exponent in the bound ∣ζ(1/2+it)∣=O(tβ(t))|\zeta(1/2 + it)| = O(t^{\beta(t)}) used in [Pla2017].

void acb_dirichlet_platt_lemma_32(arb_t out, const arb_t h, const arb_t t0, const arb_t x, slong prec)
void acb_dirichlet_platt_lemma_A5(arb_t out, slong B, const arb_t h, slong k, slong prec)
void acb_dirichlet_platt_lemma_A7(arb_t out, slong sigma, const arb_t t0, const arb_t h, slong k, slong A, slong prec)
void acb_dirichlet_platt_lemma_A9(arb_t out, slong sigma, const arb_t t0, const arb_t h, slong A, slong prec)
void acb_dirichlet_platt_lemma_A11(arb_t out, const arb_t t0, const arb_t h, slong B, slong prec)
void acb_dirichlet_platt_lemma_B1(arb_t out, slong sigma, const arb_t t0, const arb_t h, const fmpz_t J, slong prec)
void acb_dirichlet_platt_lemma_B2(arb_t out, slong K, const arb_t h, const arb_t xi, slong prec)

Set out to the error bounds of Lemma 3.2 and Lemmas A.5, A.7, A.9, A.11, B.1 and B.2 of [Pla2017], which bound the errors of the grid evaluation in acb_dirichlet_platt_multieval (truncation of the Dirichlet series, of the Taylor expansion, aliasing of the discrete Fourier transform, and so on). Lemma A.5 requires B>hkB > h\sqrt{k}; when a lemma's hypotheses fail, the bound is infinite.

void acb_dirichlet_platt_c_bound(arb_t res, slong sigma, const arb_t t0, const arb_t h, slong k, slong prec)

Set res to the bound C(σ,t0,h,k)C(\sigma, t_0, h, k) of [Pla2017] for the kk-th derivative of the scaled function in the strip used for the error analysis, with or without precomputed constants that depend only on σ\sigma, hh and kk.

void acb_dirichlet_platt_i_bound(arb_t res, const arb_t t0, slong A, const arb_t H, slong sigma, slong prec)

Set res to the bound II of [Pla2017] for the error of the Whittaker–Shannon interpolation caused by the Gaussian window and the sampling rate AA, with or without precomputed constants.

void acb_dirichlet_platt_ws_interpolation_precomp(arb_t res, arf_t deriv, const acb_dirichlet_platt_ws_precomp_t pre, const arb_t t0, arb_srcptr p, const fmpz_t T, slong A, slong B, slong Ns_max, const arb_t H, slong sigma, slong prec)

The interpolation acb_dirichlet_platt_ws_interpolation with the constants of both bounds precomputed, for many evaluations with the same AA, HH and σ\sigma.

void acb_dirichlet_platt_bound_C3(arb_t res, const arb_t t0, slong A, const arb_t H, slong Ns, slong prec)

Sets res to the bound C3C_3 of [Pla2017] for the error of truncating the interpolation sum to NsN_s points on either side.

References#

  • [Rad1973] H. Rademacher, Topics in analytic number theory, Springer, 1973.
  • [Ari2011] J. Arias de Reyna, "High precision computation of Riemann’s zeta function by the Riemann-Siegel formula, I", Mathematics of Computation 80 (2011), 995-1009
  • [Joh2018b] F. Johansson and others, "mpmath: a Python library for arbitrary-precision floating-point arithmetic (version 1.1.0)", December 2018. https://mpmath.org/
  • [Ari2012] J. Arias de Reyna, "Programs for Riemann's zeta function", (J. A. J. van Vonderen, Ed.) Leven met getallen : liber amicorum ter gelegenheid van de pensionering van Herman te Riele CWI (2012) 102-112, https://ir.cwi.nl/pub/19724
  • [Tur1953] A. M. Turing, "Some Calculations of the Riemann Zeta-Function", Proc. of the London Mathematical Society 3(3) (1953), 99-117, https://doi.org/10.1112/plms/s3-3.1.99
  • [Leh1970] R. S. Lehman, "On the Distribution of Zeros of the Riemann Zeta-Function", Proc. of the London Mathematical Society 20(3) (1970), 303-320, https://doi.org/10.1112/plms/s3-20.2.303
  • [Bre1979] R. P. Brent, "On the Zeros of the Riemann Zeta Function in the Critical Strip", Mathematics of Computation 33 (1979), 1361-1372, https://doi.org/10.1090/S0025-5718-1979-0537983-2
  • [Tru2011] T. S. Trudgian, "Improvements to Turing's method", Mathematics of Computation 80 (2011), 2259-2279, https://doi.org/10.1090/S0025-5718-2011-02470-1
  • [Tru2014] T. S. Trudgian, "An improved upper bound for the argument of the Riemann zeta-function on the critical line II", Journal of Number Theory 134 (2014), 280-292, https://doi.org/10.1016/j.jnt.2013.07.017
  • [Pla2017] D. J. Platt, "Isolating some non-trivial zeros of zeta", Mathematics of Computation 86 (2017), 2449-2467, https://doi.org/10.1090/mcom/3198
  • [Pla2011] D. J. Platt, "Computing degree 1 L-functions rigorously", Ph.D. Thesis, University of Bristol (2011), https://people.maths.bris.ac.uk/~madjp/thesis5.pdf
  • [Ari2020] J. Arias de Reyna, "Computation of the secondary zeta function", https://arxiv.org/abs/2006.04869
Cite this page

The FLINT team, “acb_dirichlet.h (module overview),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acb_dirichlet/index.html (generated 2026-11-20).