1 Introduction

As evidenced by the prominence of conjectures such as those of Birch–Swinnerton-Dyer, Beilinson, etc., central values of derivatives of L-series are key invariants of modular forms. Explicit forms of their values are therefore desirable, since they can lead to either theoretical or numerical insight about their nature.

On the other hand, an extension of classical modular forms that allowed for poles at the cusps, the weakly holomorphic modular forms, has, more recently, been the focus of intense research, with Borcherd’s work [1] representing an important highlight followed by further applications to arithmetic, combinatorial and other aspects, e.g. in [4, 7, 13, 21], etc. A comprehensive overview of the foundations of the theory as well as a variety of important applications is provided in [2].

Up until relatively recently, L-series of weakly holomorphic modular forms had not been studied systematically. In fact, to our knowledge, a first definition was given in [3] in 2014. In work by the first author and his collaborators [11], a systematic approach for all harmonic Maass forms was proposed which led to functional equations, converse theorems, etc.

A first application to special values of the L-series defined in [11] was given in [10], where results of [6] on cycle integrals were streamlined and generalised. Part of the work in [6] was based on an explicit formula of what could be thought of as the (at the time of writing of [6], not yet defined) central L-value of a weight 0 weakly holomorphic form. That formula had been suggested, in the case of the Hauptmodul, by Zagier. In [10] we interpreted those cycle integrals as values of the L-series defined in [11] and this allowed us to generalise the formulas of [6].

Here, we extend that study to values of derivatives of L-series of weakly holomorphic forms. To state the main theorem, we will briefly introduce the terms involved, but we will discuss them in more detail in the next section.

Let \(k \in 2\mathbb {N}\). We consider the action \(|_k\) of \({{\,\mathrm{SL}\,}}_2(\mathbb {R})\) on smooth functions \(f:\mathbb {H}\rightarrow \mathbb {C}\) on the complex upper half-plane \(\mathbb {H}\), given by

$$\begin{aligned} (f|_k\gamma )(z):= j(\gamma , z)^{-k} f(\gamma z), \qquad \text {for}\; \gamma =\begin{pmatrix}a &{} b \\ c &{} d \end{pmatrix}\in SL_2(\mathbb {R}), \end{aligned}$$

where \(j(\gamma , z):=cz+d\). We further recall the defining formula for the Laplace transform \(\mathcal {L}\) of a piecewise smooth complex-valued function \(\varphi \) on \(\mathbb {R}\). It is given by

$$\begin{aligned} (\mathcal {L}\varphi )(s):=\int _0^{\infty } e^{-s t} \varphi (t)\mathrm{d}t \end{aligned}$$
(1.1)

for each \(s \in \mathbb {C}\) for which the integral converges absolutely. We use the same notation \(\mathcal {L}\varphi \) for its analytic continuation to a larger domain, if such a continuation exists. Finally, if \(N \in \mathbb {N}\),

$$\begin{aligned} W_N:=\left( {\begin{matrix}0 &{} -1/\sqrt{N} \\ \sqrt{N} &{} 0 \end{matrix}}\right) . \end{aligned}$$

Let now f be a weakly holomorphic cusp form of weight k for \(\Gamma _0(N)\), i.e. a meromorphic modular form whose poles may only lie at the cusps and its Fourier expansion at each cusp has a vanishing constant term. Assume that its Fourier expansion at infinity is given by

$$\begin{aligned} f(z) = \sum _{\begin{array}{c} n \ge -n_0 \\ n \ne 0 \end{array}} a_f(n) e^{2\pi inz}. \end{aligned}$$
(1.2)

Then, the L-series of f is defined in [11] as the map \(\Lambda _f\) given by

$$\begin{aligned} \Lambda _f(\varphi )=\sum _{\begin{array}{c} n \ge -n_0 \\ n \ne 0 \end{array}} a_f(n) (\mathcal {L}\varphi )(2 \pi n) \end{aligned}$$
(1.3)

for each \(\varphi \) in a certain family of functions on \(\mathbb {R}\) which will be defined in the next section.

The main object of concern in this note will be the specialisation of this L-series to a specific family of test functions: For \((s, w) \in \mathbb {C}\times \mathbb {H}\) we denote

$$\begin{aligned} \varphi _s^w(t):={\mathbf {1}}_{[1/\sqrt{N}, \infty )}(t) N^{s/2}e^{-wt}t^{s-1}, \qquad \text {for }t>0, \end{aligned}$$
(1.4)

where \({\mathbf {1}}_X\) denotes the characteristic function of \(X \subset {\mathbb {R}}.\) We then set

$$\begin{aligned} \Lambda (f, s):=\Lambda _f(\varphi _s^0) \end{aligned}$$
(1.5)

With this notation, we have

Theorem 1.1

Let \(k \in 2\mathbb {N}\) and \(m \in \mathbb {N}\). For each weakly holomorphic cusp form of weight k for \(\Gamma _0(N)\) such that \(f|_kW_N=f\), we have

$$\begin{aligned} \Lambda ^{(m)}(f,k/2)=i^{2m-\frac{k}{2}}N^{\frac{k}{4}}\sum _{j=0}^m \left( {\begin{array}{c}m\\ j\end{array}}\right) \log ^j \left( \frac{i}{\sqrt{N}}\right) \int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}f(z) \zeta ^{(m-j)} \left( 1-\frac{k}{2}, z \right) \mathrm{d}z \end{aligned}$$

where \(\zeta (s, z)\) stands for the classical Hurwitz zeta function and \(\zeta ^{(r)}(s,z)=\frac{\partial ^{r}}{\partial s^{r}} \zeta (s,z)\).

Our approach yields new expressions for derivatives of L-series of classical cusp forms too. Specifically, classical L-series can be expressed in terms of the L-series associated with weakly holomorphic forms in [11] in the following way: For a classical cusp form f of weight k and level N with L-series \(L_f(s)\), we consider its completed L-function

$$\begin{aligned} L^*_f(s):=\left( \frac{\sqrt{N}}{2 \pi }\right) ^s \Gamma (s) L_f(s). \end{aligned}$$

Then, as verified in Sect. 4, we have

$$\begin{aligned} L^*_f(s)=\lim _{x \rightarrow 0^+}L_f(\varphi _s^{ix}-\varphi _{k-s}^{ix}) \end{aligned}$$

for \(\varphi _s^{ix}\) as in (1.4). Because of this, we can apply the method that led to Theorem 1.1, to deduce Theorem 4.2, a special case of which is the following:

Theorem 1.2

For each weight 2 cusp form f of level N, such that \(f|_2W_N=f\) we have

$$\begin{aligned} (L_f^*)'(1)=2\sqrt{N} i\int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1} f(z)\left( \log (\Gamma (z))+(\log (\sqrt{N})-\pi i/2)z \right) \mathrm{d}z. \end{aligned}$$

In particular, this formula interprets the central value of the first derivative as an integral with limits inside the upper half-plane. After providing the theoretical background in Sect. 2 and provide proofs of Theorems 1.1 and 1.2 in Sects. 3 and 4, we will present some remarks regarding computational aspects, potential applications and numerical examples of Theorems 1.1 and 1.2 in the final section.

2 L-series evaluated at test functions

In [11], a new type of L-series was associated with general harmonic Maass forms and some basic theorems about it were proved. In this section, we will provide relevant results in the special case which we need here, namely weight k weakly holomorphic cusp forms for \(\Gamma _0(N)\). We require some additional definitions to describe the set-up.

Let \(C(\mathbb {R}, \mathbb {C})\) be the space of piecewise smooth complex-valued functions on \(\mathbb {R}\). For each function f given by an absolutely convergent series of the form

$$\begin{aligned} f(z) = \sum _{\begin{array}{c} n \ge -n_0 \\ n \ne 0 \end{array}} a_f(n) e^{2\pi inz}, \end{aligned}$$
(2.1)

we let \(\mathcal {G}_f\) be the space of functions \(\varphi \in C(\mathbb {R}, \mathbb {C})\) such that

  1. (i)

    the integral defining \(\mathcal {L}\varphi \) converges absolutely if \(\Re (s) \ge 2 \pi N\) for some \(N \in \mathbb {N}\),

  2. (ii)

    the function \(\mathcal {L}\varphi \) has an analytic continuation to \(\{s \in \mathbb {H}, \Re (s) >-2 \pi n_0-\epsilon \}\) and can be continuously extended to \(\{s \ne 0; s\ge -2 \pi n_0 \}\)

  3. (iii)

    the following series converges:

    $$\begin{aligned} \sum _{\begin{array}{c} n \ge N \\ n \ne 0 \end{array}} |a(n)| (\mathcal {L}|\varphi |)\left( 2 \pi n\right) . \end{aligned}$$
    (2.2)

We are now able to define the L-series and recall some results from [11].

Definition 2.1

Let f be a function on \(\mathbb {H}\) given by the Fourier expansion (2.1). The L-series of f is defined to be the map \(\Lambda _f:{\mathcal {G}}_f \rightarrow \mathbb {C}\) such that, for \(\varphi \in \mathcal {G}_{f}\),

$$\begin{aligned} \Lambda _f(\varphi )=\sum _{\begin{array}{c} n \ge N \\ n \ne 0 \end{array}} a_f(n) (\mathcal {L}\varphi )(2 \pi n). \end{aligned}$$
(2.3)

Furthermore, for \({\text {Re}}(z)>0\), we recall the generalised exponential integral by

$$\begin{aligned} E_p(z):=z^{p-1}\Gamma (1-p,z)=\int _{1}^{\infty }\frac{e^{-zt}}{t^{p}}\mathrm {d}t \end{aligned}$$
(2.4)

The function \(E_p(z)\) has an analytic continuation to \({\mathbb {C}} {\setminus } (-\infty , 0]\) as a function of z to give the principal branch of \(E_p(z)\). Specifically, from now on we will always consider the principal branch of the logarithm, so that \(-\pi < \arg (z) \le \pi \). Then, we define the analytic continuation of \(E_p(z)\) as in (8.19.8) and (8.19.10) of [17] to be:

$$\begin{aligned} E_p(z)= {\left\{ \begin{array}{ll} z^{p-1}\Gamma (1-p)-\sum \limits _{0\le k}\frac{(-z)^k}{k!(1-p+k)} \qquad &{}\text {for }p \in {\mathbb {C}} -{\mathbb {N}},\\ \frac{(-z)^{p-1}}{(p-1)!}(\psi (p)-\log (z))-\sum \limits _{0\le k \ne p-1}\frac{(-z)^k}{k!(1-p+k)} \qquad &{}\text {for }p \in {\mathbb {N}}. \end{array}\right. } \end{aligned}$$
(2.5)

Since the two series on the right hand side of (2.5) give entire functions, we can continuously extend \(E_p(z)\) to \({\mathbb {R}}_{<0}\). By (8.11.2) of [17], we also have the bound

$$\begin{aligned} E_p(z)=O(e^{-z}), \qquad \text { as }z \rightarrow \infty \text {in the wedge }\arg (z)<3 \pi /2. \end{aligned}$$
(2.6)

A lemma that will be crucial is the sequel is:

Lemma 2.2

[11] If \({\text {Im}}(w)>0\), then we have

$$\begin{aligned} i^{a} E_{1-a}(w)= \int _i^{i+\infty } e^{iwz} z^{a-1} \mathrm{d}z. \end{aligned}$$
(2.7)

for all \(a \in {\mathbb {R}}.\) If \({\text {Im}}(w)=0\) and \({\text {Re}}(w)>0\), then (2.7) holds for all \(a<0.\)

Let \(S_k^!(N)\) denote the space of weakly holomorphic cusp forms of weight k for \(\Gamma _0(N)\). Suppose that \(f\in S_k^!(N)\) has Fourier expansion (2.1) with respect to the cusp at \(\infty \). By [5, Lemma 3.4], there exists a constant \(C_f>0\) such that

$$\begin{aligned} a_f(n)=O \left( e^{C_f \sqrt{n}}\right) , \qquad \text {as }n \rightarrow \infty . \end{aligned}$$
(2.8)

The L-series of f is then defined to be the map \(\Lambda _f:{\mathcal {G}}_f \rightarrow \mathbb {C}\) given in Definition 2.1.

To describe the L-values and derivatives which we are interested in, we consider the family of test functions given by (1.4) and then set

$$\begin{aligned} \Lambda (f, s):=\Lambda _f(\varphi _s^0)= \sum _{\begin{array}{c} n=-n_0 \\ n \ne 0 \end{array}}^\infty a_f(n) E_{1-s}\left( \frac{2 \pi n}{\sqrt{N}} \right) . \end{aligned}$$
(2.9)

Remark 2.3

Though more similar in appearance to the usual L-series than (2.3), we do not consider \(\Lambda (f, s)\) as the “canonical” L-series of f, because, in contrast to \(\Lambda _f(\varphi )\) (see Th. 3.5 of [10]), it does not satisfy a functional equation with respect to s. We formulate our results in terms of \(\Lambda (f, s)\) to incorporate it into the setting of [6] and Zagier’s formula mentioned in the introduction. The choice of \(\Lambda \), rather than L in the notation hints at the analogy with the “completed” version of the classical L-series, rather than with the L-series itself.

By the proof of Lemma 4.1 of [10], or directly, we see that, for \({\text {Re}}(w)>-\epsilon \), \(\varphi _s^w \in {\mathcal {G}}_f\) and

$$\begin{aligned} \Lambda _f(\varphi _s^{w})= N^{\frac{s}{2}}\sum _{\begin{array}{c} n\ge -n_0 \\ n \not =0 \end{array}}a_f(n)\int _{\frac{1}{\sqrt{N}}}^{\infty }e^{-2 \pi n t-wt }t^{s-1}\mathrm{d}t =\sum _{\begin{array}{c} n \ge -n_0 \\ n \not =0 \end{array}} a_f(n)E_{1-s}\left( \frac{2 \pi n +w}{\sqrt{N}} \right) .\nonumber \\ \end{aligned}$$
(2.10)

Because of (2.6) and the trivial bound for \(a_f(n)\), the series \(\sum _{\begin{array}{c} n>0 \end{array}} a_f(n)E_{1-s}( (2 \pi n +w)/\sqrt{N})\) converges absolutely and uniformly in compact subsets of \(\{w \in \mathbb {H}; {\text {Re}}(w) >-\epsilon \}\), for each fixed \(s \in \mathbb {C}\). Since, in addition, \(E_{1-s}(z)\) is continuous from above at each \(z \in {\mathbb {R}}_{<0}\), we deduce, by comparing with (2.9), that

$$\begin{aligned} \lim _{x \rightarrow 0^+}\Lambda _f(\varphi _s^{ix})=\Lambda (f, s). \end{aligned}$$

Let now \(s \in \mathbb {R}\) and \(x>0\). By Lemma 2.2, followed by a change of variables and (2.1), the sum (2.10) becomes

$$\begin{aligned}&i^{-s}\sum _{\begin{array}{c} n \ge -n_0 \\ n \not =0 \end{array}}a_f(n)\int _{i}^{i+\infty }e^{\frac{(2 \pi n +ix)iz}{\sqrt{N}} }z^{s-1}\mathrm{d}z \nonumber \\&\quad = i^{-s}N^{s/2}\int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+\infty }e^{-xz}f(z)z^{s-1}\mathrm{d}z. \end{aligned}$$
(2.11)

With the periodicity of f, we see that the last integral equals

$$\begin{aligned} \sum _{n=0}^{\infty }\int _{\frac{i}{\sqrt{N}}+n}^{\frac{i}{\sqrt{N}}+n+1}e^{-xz}f(z)z^{s-1}\mathrm{d}z= \int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}e^{-xz}f(z)\zeta \left( 1-s, \frac{ix}{2\pi }, z \right) \mathrm{d}z, \end{aligned}$$

where

$$\begin{aligned} \zeta (s, a, z):=\sum _{m=0}^{\infty } e^{2 \pi i m a}(z+m)^{-s} \end{aligned}$$

is the Lerch zeta function, which is well defined since \(x>0\). Therefore, we have the following:

Proposition 2.4

For each \(f \in S^!_k(N)\) and for each \(x>0\) and \(s \in {\mathbb {R}}\), we have

$$\begin{aligned} \Lambda _f(\varphi _s^{ix})= i^{-s}N^{\frac{s}{2}} \int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}e^{-xz}f(z) \zeta \left( 1-s, \frac{ix}{2\pi }, z \right) \mathrm{d}z. \end{aligned}$$

3 Derivatives of \(\Lambda (f, s)\)

Let m be a positive integer. By \(\Lambda ^{(m)}_f(\varphi _s^{w})\), we denote the mth derivative with respect to s. Equation (2.10) implies that

$$\begin{aligned} \Lambda ^{(m)}_f(\varphi _s^{w})|_{s=\frac{k}{2}} =\sum _{\begin{array}{c} n \ge -n_0 \\ n \not =0 \end{array}}a_f(n)\frac{\mathrm{d}^m}{\mathrm{d}s^m}\left( E_{1-s}\left( \frac{2 \pi n +w}{\sqrt{N}} \right) \right) \Big |_{s=\frac{k}{2}}. \end{aligned}$$
(3.1)

By the absolute and uniform, in w with \({\text {Re}}(w)>-\epsilon \), convergence of the piece of this series with \(n>0\), we deduce that the limit as \(w \rightarrow 0\) (from above) exists and, with (2.9), we have

$$\begin{aligned} \lim _{x \rightarrow 0^+} \left( \Lambda ^{(m)}_f(\varphi _s^{ix})|_{s=\frac{k}{2}}\right) = \sum _{\begin{array}{c} n \ge -n_0 \\ n \not =0 \end{array}}a_f(n)\frac{\mathrm{d}^m}{\mathrm{d}s^m}\left( E_{1-s}\left( \frac{2 \pi n}{\sqrt{N}} \right) \right) \Big |_{s=\frac{k}{2}}= \Lambda ^{(m)}(f, k/2). \end{aligned}$$
(3.2)

On the other hand, we have

$$\begin{aligned}&\frac{\mathrm{d}^m}{\mathrm{d}s^m}\left( (i/\sqrt{N})^{-s}\zeta \left( 1-s, \frac{ix}{2\pi }, z \right) \right) \Big |_{s=\frac{k}{2}}\\&\quad =(-1)^m\left( \frac{\sqrt{N}}{i} \right) ^{\frac{k}{2}}\sum _{j=0}^m (-1)^j \left( {\begin{array}{c}m\\ j\end{array}}\right) \log \left( \frac{\sqrt{N}}{i} \right) ^j \zeta ^{(m-j)}\left( 1-\frac{k}{2}, \frac{ix}{2 \pi }, z \right) . \end{aligned}$$

Using (3.2) and Prop. 2.4, we deduce that

$$\begin{aligned} \Lambda ^{(m)}(f, k/2)= & {} (-1)^{m} \left( \frac{\sqrt{N}}{i}\right) ^{\frac{k}{2}}\sum _{j=0}^m \left( {\begin{array}{c}m\\ j\end{array}}\right) \log \left( \frac{i}{\sqrt{N}}\right) ^j \nonumber \\&\times \lim _{x \rightarrow 0^+} \int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}e^{-xz}f(z) \zeta ^{(m-j)} \left( 1-\frac{k}{2}, \frac{ix}{2\pi }, z \right) \mathrm{d}z. \end{aligned}$$
(3.3)

We now use (8) of Sect. 1.11 of [14] according to which, for \(z \in {\mathbb {H}}\), \(s \not \in {\mathbb {N}}\) and \(x>0\) small enough, we have

$$\begin{aligned} e^{-xz}\zeta \left( s, \frac{ix}{2 \pi }, z \right) =\Gamma (1-s) x^{s-1}+ \sum _{r=0}^{\infty } \zeta (s-r, z)\frac{(-x)^r}{r!}, \end{aligned}$$
(3.4)

where \(\zeta (s, w)\) is the Hurwitz zeta function. This gives, for every \(\ell \in {\mathbb {N}},\)

$$\begin{aligned} e^{-xz}\zeta ^{(\ell )} \left( s, \frac{ix}{2 \pi }, z \right) =\sum _{j=0}^{\ell }(-1)^j \Gamma ^{(j)}(1-s) x^{s-1} \log ^{j}x + \sum _{r=0}^{\infty } \zeta ^{(\ell )}(s-r, z) \frac{(-x)^r}{r!} \end{aligned}$$
(3.5)

and thus,

$$\begin{aligned} e^{-xz}\zeta ^{(\ell )} \left( 1-\frac{k}{2}, \frac{ix}{2 \pi }, z \right) =\sum _{j=0}^{\ell }(-1)^j x^{-k/2} \Gamma ^{(j)}(\frac{k}{2}) \log ^{j}x + \sum _{r=0}^{\infty } \zeta ^{(\ell )}(1-\frac{k}{2}-r, z) \frac{(-x)^r}{r!}. \end{aligned}$$

This implies that, for each \(j \in \mathbb {N}\), we have

$$\begin{aligned}&\int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}e^{-xz}f(z) \zeta ^{(\ell )} \left( 1-\frac{k}{2}, \frac{ix}{2\pi }, z \right) \mathrm{d}z\\&\quad = \left( \sum _{j=0}^{\ell }(-1)^j\Gamma ^{(j)}\left( \frac{k}{2}\right) x^{-\frac{k}{2}} \log ^j x \right) \int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}f(z)\mathrm{d}z\\&\qquad +\sum _{r=0}^{\infty }\frac{(-x)^r}{r!}\int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}f(z)\zeta ^{(\ell )}\left( 1-\frac{k}{2}-r, z\right) \mathrm{d}z. \end{aligned}$$

Since f has a zero constant term in its Fourier expansion, it follows that

$$\begin{aligned} \int _{i/\sqrt{N}}^{i/\sqrt{N}+1}f(z)\mathrm{d}z=0. \end{aligned}$$
(3.6)

Therefore,

$$\begin{aligned} \lim _{x \rightarrow 0^+} \int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}e^{-xz}f(z) \zeta ^{(\ell )} \left( 1-\frac{k}{2}, \frac{ix}{2\pi }, z \right) \mathrm{d}z =\int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}f(z)\zeta ^{(\ell )} \left( 1-\frac{k}{2}, z\right) \mathrm{d}z.\nonumber \\ \end{aligned}$$
(3.7)

This, combined with (4.5), proves Theorem 1.1. In the case of weight 2, it simplifies to

Corollary 3.1

For each \(f \in S^!_2(N)\) such that \(f|_2W_N=f\), we have

$$\begin{aligned} \Lambda '(f, 1)=\sqrt{N} i\int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1} f(z)\left( \log (\Gamma (z))+(\log (\sqrt{N})-\pi i/2)z \right) \mathrm{d}z. \end{aligned}$$

Proof

If \(k=2\) and \(m=1 \), the formula of the theorem becomes

$$\begin{aligned} \Lambda '(f, 1)=\sqrt{N} i \left( \log (i/\sqrt{N})\int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}f(z) \zeta (0, z) \mathrm{d}z+ \int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}f(z) \zeta ' (0, z) \mathrm{d}z \right) . \end{aligned}$$
(3.8)

The well-known identity \(\zeta (0, z) = 1/2 - z\) and (3.6) imply that the first integral equals

$$\begin{aligned} -\int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1} f(z)z\mathrm{d}z. \end{aligned}$$

For the second integral, we combine (3.6) with the identity (see, e.g. (10) of 1.10 of [14])

$$\begin{aligned} \zeta '(0, z)=\log (\Gamma (z))-\frac{1}{2}\log (2 \pi ). \end{aligned}$$

From those formulas for the two integrals, we deduce the corollary. \(\square \)

Finally, we comment on the relation between Theorem 1.2 (applying to holomorphic cusp forms) and Corollary 3.1 (applying to weakly holomorphic ones). Since a holomorphic cusp form is, of course, weakly holomorphic, Corollary 3.1 applies to it too and one might expect the two formulas to agree completely. However, the subject of Theorem 1.2 is a different L-series from the \(\Lambda (f, s)\) appearing in Corollary 3.1, namely \(L_f^*(s)\). They both originate in the more general \(\Lambda _f(\varphi )\) but they are not quite the same, \(L_f^*(s)\) being simply a “symmetrised” version of \(\Lambda (f, s).\) This explains why the formulas are identical except for the factor of 2 in the formula for the central derivative of \(L_f^*(s)\).

4 L-functions associated with cusp forms and their derivatives

The case of classical cusp forms and their L-functions can be accounted for by the same approach. However, the setting must be slightly adjusted, ultimately because of the lack of a functional equation for \(\Lambda (f, s)\) when f is weakly holomorphic, as discussed in Remark 2.3.

Specifically, we let f be a holomorphic cusp form of weight k for \(\Gamma _0(N)\) with a Fourier expansion

$$\begin{aligned} f(z) = \sum _{\begin{array}{c} n > 0 \end{array}} a_f(n) e^{2\pi inz}, \end{aligned}$$
(4.1)

and such that

$$\begin{aligned} f|_kW_N=f, \qquad \text {for }W_N=\left( {\begin{matrix}0 &{} -1/\sqrt{N} \\ \sqrt{N} &{} 0 \end{matrix}}\right) . \end{aligned}$$

We recall the classical integral expression for the completed L-function of f:

$$\begin{aligned} \begin{aligned} L^*_f(s)&:=\left( \frac{\sqrt{N}}{2 \pi }\right) ^s \Gamma (s) L_f(s)\\&= N^{\frac{s}{2}} \int _{1/\sqrt{N}}^{\infty }f(it)t^{s-1}\mathrm{d}t+i^k N^{\frac{k-s}{2}} \int _{1/\sqrt{N}}^{\infty }f(it)t^{k-1-s}\mathrm{d}t \\&= \sum _{n>0}a_f(n)E_{1-s}(2 \pi n/\sqrt{N})+i^k \sum _{n>0}a_f(n)E_{s-k+1}(2 \pi n/\sqrt{N}) \end{aligned} \end{aligned}$$
(4.2)

We observe that, thanks to (2.6), this converges for all \(s \in \mathbb {C}.\) The completed L-function can be recast in terms of the L-series formalism of [10] and the family of test functions given in (1.4). Indeed, if \({\text {Re}}(w) >-\epsilon \), we have,

$$\begin{aligned} L_f(\varphi _s^{w}+i^k\varphi _{k-s}^{w})= & {} N^{\frac{s}{2}}\sum _{n>0}a_f(n)\int _{\frac{1}{\sqrt{N}}}^{\infty }e^{-2 \pi n t-wt }t^{s-1}\mathrm{d}t \nonumber \\&+i^k N^{\frac{k-s}{2}}\sum _{n>0}a_f(n)\int _{\frac{1}{\sqrt{N}}}^{\infty }e^{-2 \pi n t-wt }t^{k-1-s}\mathrm{d}t \nonumber \\= & {} \sum _{n>0}a_f(n)\int _{1}^{\infty }e^{-\frac{(2 \pi n +w)t}{\sqrt{N}} }t^{s-1}\mathrm{d}t \nonumber \\&+i^k \sum _{n>0}a_f(n)\int _{1}^{\infty }e^{-\frac{(2 \pi n +w)t}{\sqrt{N}}}t^{k-1-s}\mathrm{d}t \end{aligned}$$
(4.3)

As in the previous section (but more easily, since we do not have any terms with \(n<0\)), the series converges absolutely and uniformly in compact subsets of \(\{w \in \mathbb {H}; {\text {Re}}(w) >-\epsilon \}\), for each fixed \(s \in \mathbb {C}\). Hence, comparing with (4.2), we see that

$$\begin{aligned} \lim _{x \rightarrow 0^+}L_f(\varphi _s^{ix}+i^k\varphi _{k-s}^{ix})=L^*_f(s). \end{aligned}$$

Let now \(s \in \mathbb {R}\) and \(w \in \mathbb {H}\) with \({\text {Re}}(w)>-\epsilon \). By Lemma 2.2, followed by a change of variables and (4.1), the sum (4.3) becomes

$$\begin{aligned} i^{-s}\sum _{n>0}a_f(n)\int _{i}^{i+\infty }e^{\frac{(2 \pi n +w)iz}{\sqrt{N}} }z^{s-1}\mathrm{d}z+i^k i^{s-k}\sum _{n>0}a_f(n)\int _{i}^{i+\infty }e^{\frac{(2 \pi n +w)t}{\sqrt{N}}}t^{k-1-s}\mathrm{d}z \nonumber \\ = i^{-s}N^{s/2}\int _{i/\sqrt{N}}^{i/\sqrt{N}+\infty }e^{iwz}f(z)z^{s-1}\mathrm{d}z+ i^{s}N^{(k-s)/2}\int _{i/\sqrt{N}}^{i/\sqrt{N}+\infty }e^{iwz}f(z)z^{k-1-s}\mathrm{d}z. \end{aligned}$$
(4.4)

This is a “symmetrised” analogue of (2.11), and therefore, working similarly to the last section, we can deduce the following analogue of Prop. 2.4:

Proposition 4.1

Let \(f \in S_k(N)\) such that \(f|_kW_N=f\). For each \(w \in {\mathbb {H}}\) with \({\text {Re}}(w)>-\epsilon \) and each \(s \in {\mathbb {R}}\), we have

$$\begin{aligned} L_f(\varphi _s^{w}+i^k\varphi _{2-s}^{w})= & {} \int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}e^{iwz}f(z) \left( i^{-s}N^{\frac{s}{2}}\zeta \left( 1-s, \frac{w}{2\pi }, z \right) \right. \\&\left. +i^{s}N^{\frac{k-s}{2}}\zeta \left( s-k+1, \frac{w}{2\pi }, z \right) \right) \mathrm{d}z. \end{aligned}$$

To pass to derivatives, we let m be a positive integer. Equation (4.3) implies that

$$\begin{aligned} L^{(m)}_f(\varphi _s^{w}+i^k\varphi _{2-s}^{w})|_{s=\frac{k}{2}} =(1+i^{2m+k})\sum _{n>0}a_f(n)\int _{1}^{\infty }e^{-\frac{(2 \pi n +w)t}{\sqrt{N}} }t^{\frac{k}{2}-1} \log ^m t \mathrm{d}t. \end{aligned}$$

which is the analogue of (3.1) and thus, we can work in an entirely analogous way to the last section to obtain

$$\begin{aligned} (L^*_f)^{(m)}\left( \frac{k}{2}\right)= & {} (i^{2m}+i^k) \left( \frac{\sqrt{N}}{i}\right) ^{\frac{k}{2}}\sum _{j=0}^m \left( {\begin{array}{c}m\\ j\end{array}}\right) \log \left( \frac{i}{\sqrt{N}}\right) ^j \nonumber \\&\times \lim _{x \rightarrow 0^+} \int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}e^{-xz}f(z) \zeta ^{(m-j)} \left( 1-\frac{k}{2}, \frac{ix}{2\pi }, z \right) \mathrm{d}z. \end{aligned}$$
(4.5)

Applying (8) of Sect. 1.11 of [14] as in the last section implies that this equals

$$\begin{aligned} (i^k+i^{2m}) \left( \frac{\sqrt{N}}{i}\right) ^{\frac{k}{2}} \sum _{j=0}^m \left( {\begin{array}{c}m\\ j\end{array}}\right) \log ^j \left( \frac{i}{\sqrt{N}}\right) \int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}f(z) \zeta ^{(m-j)} \left( 1-\frac{k}{2}, z \right) \mathrm{d}z. \end{aligned}$$

Since \(L^*_f(s)=(\sqrt{N}/(2 \pi ))^s\Gamma (s)L_f(s),\) this gives:

Theorem 4.2

Let m be a positive integer. For each \(f \in S_k(N)\) such that \(f|_kW_N=f\) and \(L^{(j)}_f(k/2)=0\) for \(j<m\), we have

$$\begin{aligned} L^{(m)}_f\left( \frac{k}{2}\right)= & {} \frac{i^k+i^{2m}}{\left( \frac{k}{2} - 1 \right) !} (-2 \pi i )^{\frac{k}{2}}\sum _{j=0}^m \left( {\begin{array}{c}m\\ j\end{array}}\right) \log ^j \left( \frac{i}{\sqrt{N}}\right) \\&\times \int _{\frac{i}{\sqrt{N}}}^{\frac{i}{\sqrt{N}}+1}f(z) \zeta ^{(m-j)} \left( 1-\frac{k}{2}, z \right) \mathrm{d}z. \end{aligned}$$

Theorem 1.2 follows from this exactly as in Corollary 3.1 once we take into account that, if \(k=2\) and \(f|_2W_N=f\), we automatically have \(L_f(1)=0\) by the classical functional equation for \(f \in S_2(N).\)

5 Computational and algorithmic aspects

Consider first the special case of a holomorphic cusp form f of weight \(k=2\) and level N, which is invariant under the Fricke involution \(W_{N}\). Suppose that f has a Fourier expansion of the form (4.1). It is clear from (4.2) and symmetry that the central value \(L_{f}^{*}(1)\) is zero and the rth central derivative is zero, if r is even, and

$$\begin{aligned} (L_{f}^*)^{(r)}(1)=2r!\sum _{n>0}a_{f}(n)E_{0}^{r}\left( \frac{2\pi n}{\sqrt{N}}\right) , \end{aligned}$$

if r is odd. Here

$$\begin{aligned} E_{s}^{r}(z)=\frac{1}{r!}\int _{1}^{\infty }e^{-zt}(\log t)^{r}t^{-s}\mathrm{d}t \end{aligned}$$

is \((-1)^{r}/r!\) times the rth derivative of \(E_{s}(z)\) with respect to s. It is initially defined for \(\Re (z)>0\) and can be extended to \(\mathbb {H}\cup \mathbb {R}_{<0}\) via (5.4) and (5.2) below. Using integration by parts, it can be shown that \(E_{0}^{r}(z)=\frac{1}{z}E_{1}^{r-1}(z)\), which leads to the expression

$$\begin{aligned} (L_{f}^*)^{(r)}(1)=\frac{\sqrt{N}}{\pi }r!\sum _{n>0}a(n)\frac{1}{n}E_{1}^{r-1}\left( \frac{2\pi n}{\sqrt{N}}\right) . \end{aligned}$$
(5.1)

This expression was first obtained by Buhler, Gross and Zagier in [8], where the authors used the following expression to evaluate \(E_{1}^{m}(z)\) for any \(m\ge 1\) and \(z>0\)

$$\begin{aligned} E_{1}^{m}(z)=G_{m+1}=P_{m+1}(-\log z)+\sum _{n\ge 1}\frac{(-1)^{n-m-1}}{n^{m+1}n!}z^{n}. \end{aligned}$$
(5.2)

Here, \(P_{r}(x)\) is a polynomial of degree r and if we write \(\Gamma (1+z)=\sum _{n\ge 0}\gamma _{n}z^{n}\) then

$$\begin{aligned} P_{r}(t)=\sum _{j=0}^{r}\gamma _{r-j}\frac{t^{j}}{j!}. \end{aligned}$$

Extending this method to weights \(k\ge 4\) and weakly holomorphic modular forms is immediate. If \(f\in S_{k}^{!}(N)\) has Fourier expansion at infinity of the form (2.1) then the analogue of (4.2) is (2.9). Upon differentiating (2.9) r times with respect to s and setting \(s=k/2\) leads to

$$\begin{aligned} \Lambda ^{(r)}(f,k/2)=r!\sum _{\begin{array}{c} n \ge -n_0 \\ n \ne 0 \end{array}}a_{f}(n)E^{r}_{1-k/2}\left( \frac{2\pi n}{\sqrt{N}}\right) , \end{aligned}$$
(5.3)

where we note that for a holomorphic f we have \((L_{f}^*)^{(m)}(k/2)=(1+i^{k+2m})\Lambda ^{(m)}(f,k/2)\). It follows that we need to evaluate \(E_{-n}^{r}\) where \(n=k/2-1.\) To compare the complexity of these computations with the weight 2 case, we note that Milgram [16, (2.22)] showed that

$$\begin{aligned} E_{-n}^{m}(z)=\frac{\Gamma (n+1)}{z^{n+1}}\left[ e^{-z}\sum _{l=0}^{n-m}\frac{z^{l}}{l!}\xi _{l,n}^{m}+\sum _{l=1}^{m}\xi _{0,n}^{l-1}E_{1}^{m-l}(z)\right] , \end{aligned}$$
(5.4)

where \(\xi _{l,n}^{j}\) are constants independent of z and can be precomputed. Using this together with (5.2), it follows that the computation essentially reduces to that of a finite sum of polynomials and an infinite rapidly convergent sum.

It is also worth to mention here that the general algorithm to compute values and derivatives of Motivic L-functions introduced by Dokchitser in [12] and implemented in PARI/GP [19], essentially reduces to that described above in the case of holomorphic modular forms. Furthermore, in both [8] and [12] the authors make additional use of asymptotic expansions to speed up computations of \(E_{-n}^{m}(z)\) for large z.

5.1 The new integral formula

Let \(f\in S_{k}^{!}(\Gamma _{0}(N))\) be a weakly holomorphic cusp form of even integral weight k and that satisfies \(f|_{k}W_{N}=f\). Then, Theorem 1.1 implies that

$$\begin{aligned} \Lambda ^{(m)}(f,k/2)= & {} i^{2m-k/2}N^{k/4}\sum _{j=0}^{m}{m \atopwithdelims ()j} \log ^{j}\left( \frac{i}{\sqrt{N}}\right) \\&\times \int _{i/\sqrt{N}}^{i/\sqrt{N}+1}f(z)\zeta ^{(m-j)}\left( 1-\frac{k}{2},z\right) \mathrm{d}z, \end{aligned}$$

where \(\Lambda (f,s)\) is defined in (1.5). When computing these values, it is clear that the main CPU time is spent on computing integrals of the form

$$\begin{aligned} I_{r}(f)=\int _{0}^{1}f(x+i/\sqrt{N})\zeta ^{(r)}\left( 1-k/2,x+i/\sqrt{N}\right) \mathrm{d}x,\ 0\le r\le m. \end{aligned}$$

The cusp form f is given in terms of the Fourier expansion (2.1) for some \(n_{0}\ge 0\). To evaluate \(f(x+i/\sqrt{N})\) up to a precision of \(\varepsilon =10^{-D}\) for all \(x\in [0,1]\), we can truncate the Fourier series at some integer \(M>0\). The precise choice of M depends on the available coefficient bounds. In case f is holomorphic then Deligne’s bound can be used to show that we can choose M such that

$$\begin{aligned} M > c_{1}k\sqrt{N}\log M +\sqrt{N}(c_{2}D+c_{3}\log (\sqrt{N}(k/2)!))+c_{4} \end{aligned}$$

for some explicit positive constants \(c_{1},c_{2},c_{3}\) and \(c_{4}\), independent of ND and k. However, if f is not holomorphic then we only have the non-explicit bound (2.8) and M must satisfy

$$\begin{aligned} M > c_{1}'\sqrt{N}\sqrt{M} + c_{2}'\sqrt{N}D+c_{3}'\sqrt{N}\log N, \end{aligned}$$

where \(c_{1}',\) \(c_{2}',\) \(c_{3}'\) and \(c_{4}'\) are positive constants that depend on f and can be computed in special cases using Poincaré series. In both cases we From both inequalities above it is clear that as the level or weight increases we need a larger number of coefficients, which increases the number of arithmetic operations needed. Note that the working precision might also need to be increased due to cancellation errors. To evaluate the Hurwitz zeta function and its derivatives, it is possible to use, for instance, the Euler–Maclaurin formula

$$\begin{aligned} \zeta (s,z)= & {} \sum _{n=0}^{M-1}\frac{1}{(n+z)^{s}}+\frac{(z+M)^{1-s}}{s-1}\\&+\frac{1}{(z+M)^{s}}\left( \frac{1}{2}+\sum _{l=1}^{L}\frac{B_{2l}}{(2l!)}\frac{(s)_{2l-1}}{(z+M)^{2l-1}}\right) +\text {Err}(M,L), \end{aligned}$$

where \(M,L\ge 1\) and where the error term \(\text {Err}(M,L)\) can be explicitly bounded. For more details, including proof and analysis of rigorous error bounds and choice of parameters, see [15], where the generalisation to derivatives \(\zeta ^{(r)}(s,z)\) is also included. In our case, \(s=1-k/2\) and \(z=x+i/\sqrt{N}\) with \(0\le x\le 1\). It is easy to use Theorem 1 of [15] to show that if \(M>1\) and \(L>k/4\) then

$$\begin{aligned} \left| \text {Err}(M,L)\right| \le \frac{2M^{2k}}{(2\pi M)^{2L}}\frac{|(1-k/2)_{2L}|}{L-k/4}, \end{aligned}$$

where \((s)_{m}=s(s+1)\cdots (s+m-1)\) is the usual Pochhammer symbol. Furthermore, if the right-hand side above is denoted by B then it can be shown that the error in the Euler–Maclaurin formula for the rth derivative can be bounded by \(B\cdot r!\log (8(M+1))^{r}\). In [15], it is observed that to obtain D digits of precision we should choose \(M\sim L\sim D,\) meaning that the number of terms in both sums is proportional to D. It is also clear that as k or r increases we will need larger values of M and L.

Example 5.1

Consider \(f\in S_{2}\) (37) and standard double precision, i.e. 53 bits or 15 (decimal) digits. Then, a single evaluation of \(f(x+i/\sqrt{37})\) takes \(271\mu s\) while \(\zeta ^{(r)}(0,x+i/\sqrt{37})\) takes \(2\mu s\), \(114\mu s\), \(124\mu s\), \(171\mu s\) for \(r=1,2,3\) and 20, respectively.

5.2 Comments on the implementation

There are a few simple optimisations that can be applied immediately to decrease the number of necessary function evaluations.

  • Replace the sum of integrals by \(\int _{0}^{1}f(x+i/\sqrt{N})Z_{m}(x+i/\sqrt{N})\mathrm{d}x\), where

    $$\begin{aligned} Z_{m}(z)=\sum _{j=0}^{m}{m \atopwithdelims ()j}\log ^{j}\left( \frac{i}{\sqrt{N}}\right) \zeta ^{(m-j)}\left( 1-\frac{k}{2},z\right) . \end{aligned}$$
  • If f(z) has real Fourier coefficients then \(f(1-x+i/\sqrt{N})=\overline{f(x+i/\sqrt{N})}\), which is very useful as we can choose the numerical integration method with nodes that are symmetric with respect to \(x=1/2\).

  • If we need to compute \(\Lambda ^{(r)}(f,k/2)\) for a sequence of rs, then function values of f and lower derivatives \(\zeta ^{(j)}\) can be cached in each step provided that the we use the same nodes for the numerical integration.

As the main goal of this paper is to present a new formula and not to present an optimised efficient algorithm as such, we have implemented all algorithms in SageMath using the mpmath Python library for the Hurwitz zeta function evaluations as well as for the numerical integration using Gauss–Legendre quadrature. The implementation used to calculate the examples below can be found in a Jupyter notebook which is available from [20].

5.3 Examples of holomorphic forms

To demonstrate the veracity of the formulas in this paper, we first present a comparison of results and indicative timings between the new formula in this paper and Dokchitser’s algorithm in PARI (interfaced through SageMath).

Table 1 includes three holomorphic cusp forms \(\text {37.2.a.a}\), \(\text {127.4.a.a}\) and \(\text {5077.2.a.a}\), labelled according to the LMFDB [18]. These are all invariant under the Fricke involution and it is known that the analytic ranks are 1,  2 and 3, respectively. The last column gives the difference between the values computed by Dokchitser’s algorithm and the integral formula.

Table 1 Central derivatives \((L_{f}^*)^{(r)}(k/2)\) for \(f\in S_k(\Gamma _0(N))\)

As the level increases, we find that \(f(x+i/\sqrt{N})\) oscillates more and more and it is necessary to increase the degree of the Legendre polynomials used in the Gauss–Legendre quadrature. The comparison of timings in Table 1 indicates that our new formula is slower than Dokchitser’s algorithm but it is important to keep in mind the latter is implemented in the PARI C library and is compiled while our formula is simply implemented directly in SageMath using the mpmath Python library. All CPU times presented below are obtained on a 2GHz Intel Xeon Quad Core and we stress that the times should not be taken as absolute performance measures but simply to provide comparisons between different input and parameter values.

5.4 Examples of weakly holomorphic modular forms

To construct weakly modular cusp forms, we use the Dedekind eta functions

$$\begin{aligned} \eta (\tau )=q^{\frac{1}{24}}\prod _{n\ge 1}\left( 1-q^{n}\right) . \end{aligned}$$

If we define

$$\begin{aligned} \Delta _{2}^{+}(\tau )=(\eta (\tau )\eta (2\tau ))^{8}=q-8q^{2}+12q^{3}+64q^{4}+O(q^{5}) \end{aligned}$$

and

$$\begin{aligned} j_{2}^{+}(\tau )= & {} (\eta (\tau )/\eta (2\tau ))^{24}+24+2^{12}(\eta (2\tau )/\eta (\tau ))^{24}\\= & {} q^{-1}+4372q+96256q^{2}+1240002q^{3}+O(q^{4}) \end{aligned}$$

then it can be shown that \(\Delta _{2}^{+}\in S_{8}(\Gamma _{0}(2))\) and \(j_{2}^{+}\in S_{0}^{!}(\Gamma _{0}(2))\) are both invariant under the Fricke involution \(W_{2}\). The following holomorphic and weakly holomorphic modular forms of weight 16 on \(\Gamma _{0}(2)\) were introduced by Choi and Kim [9] to study weakly holomorphic Hecke eigenforms.

$$\begin{aligned} f_{16,-2}(\tau )&=\Delta _{2}^{+}(\tau )^{2}=q^{2}-16q^{3}+O(q^{4}) \\ f_{16,-1}(\tau )&=\Delta _{2}^{+}(\tau )^{2}(j_{2}^{+}(\tau )+16)=q+4204q^{3}+O(q^{4})\\ f_{16,0}(\tau )&=\Delta _{2}^{+}(\tau )^{2}(j_{2}^{+}(\tau )^{2}+16j_{2}^{+}(\tau )-8576)=1+261120q^{3}+O(q^{4})\\ f_{16,1}(\tau )&=\Delta _{2}^{+}(\tau )^{2}(j_{2}^{+}(\tau )^{3}+16j_{2}^{+}(\tau )^{2}-12948j_{2}^{+}(\tau )-427328)\\&=q^{-1}+7525650q^{3}+O(q^{4})\\ f_{16,2}(\tau )&=\Delta _{2}^{+}(\tau )^{2}(j_{2}^{+}(\tau )^{4}+16j_{2}^{+}(\tau )^{3}-17320j_{2}^{+}(\tau )^{2}-593536j_{2}^{+}(\tau )-27188524)\\&=q^{-2}+140479808q^{3}+O(q^{4}) \end{aligned}$$

and it is easy to see that all of these functions are also invariant under \(W_{2}\). Furthermore, \(f_{16,-2},f_{16,-1}\in S_{16}(\Gamma _{0}(2))\) and \(f_{16,1},f_{16,2}\in S_{16}^{!}(\Gamma _{0}(2))\) while \(f_{16,0}\) is not cuspidal.

To check the accuracy of our formula in this setting, we first consider the holomorphic cusp forms. Observe that the unique newform of level 2 and weight 16 is

$$\begin{aligned} f(\tau )=q-128q^{2}+6252q^{3}+16384q^{4}+90510q^{5}+O(q^{6})=f_{16,-1}-128f_{16,-2}. \end{aligned}$$

Using Dokchitser’s algorithm, we find that \(L_{f}^{*}(8)=0.0526855929956408\), while using the integral formula with 53 bits precision, we obtain

$$\begin{aligned} L_{f_{16,-2}}^{*}(8)&=0.00008045589767063483+6\cdot 10^{-20}i,\\ L_{f_{16,-1}}^{*}(8)&=0.06298394789748197609+3\cdot 10^{-17}i, \end{aligned}$$

and

$$\begin{aligned} L_{f_{16,-1}}^{*}(8)-128L_{f_{16,-2}}^{*}(8)=0.05268559299564071785+2\cdot 10^{-17}i, \end{aligned}$$

which agrees with the value of \(L^{*}_f(8)\) above.

Table 2 gives the values of \(\Lambda ^{(r)}(f_{16,i},8)\) for the weakly holomorphic modular forms \(f_{16,1}\) and \(f_{16,2}\), computed using the integral formula with 103 bits working precision. The table contains an indication of timings as well as a heuristic error estimate based on a comparison with the same value computed using 203 bits precision.

To provide some independent verification of the algorithm in the case of weakly modular forms, we also implemented the generalisation of the algorithm from [8] using (5.3) directly with \(E_{1-k/2}^{r}\) evaluated using (5.4) and (5.2). The main obstacle with the algorithm modelled on [8] is that the infinite sum in (5.2) suffers from catastrophic cancellation for large z unless the working precision is temporarily increased within the sum. The corresponding values of \(\Lambda ^{(r)}(f_{16,i},8)\) computed using the algorithm with 103 bits starting precision are given in Table 3 where we also give the corresponding timings as well as an error estimate based on comparison with values in Table 2.

Table 2 \(\Lambda ^{(r)}(f_{16,i},8)\) computed using the integral formula with 103 bits precision
Table 3 \(\Lambda ^{(r)}(f_{16,i},8)\) computed using the sum with 103 bits precision