back to table · edit · history · where entries came from · files · download
4502 bytes, as of the version from 2026-11-15 20:42 (current). Recorded here, not run.
"""Central Taylor coefficients of completed quadratic Dirichlet L-functions.
Table T719.
Install numberdb and python-flint in the Sage Python environment:
sage -pip install numberdb python-flint
sage -python generate.py # verify every stored entry
sage -python generate.py --publish # additive upload, no review offer
D is a nontrivial fundamental discriminant, q=abs(D), a=int(D<0).
Lambda_D(s)=(q/pi)^(s/2) Gamma((s+a)/2) L(s,Kronecker(D,.)), and
Lambda_D(1/2+z)=sum(gamma_D(m)*z^(2*m)/m!, m>=0).
These are signed exponential even coefficients, not the ordinary coefficients,
not derivatives themselves and not coefficients after putting z=i*t.
FLINT evaluates the finite Hurwitz-zeta identity and Gamma/power series with
rigorous balls. At least 640 bits and 300 guard bits beyond the requested
decimal precision are used; the actual relative accuracy is checked.
No input is a rounded decimal. Exact binary midpoint/radius conversion yields
native Sage RealBall values. The independent theta_check.py uses validated
quadrature with explicit Gaussian and integration-tail bounds.
"""
import os
import sys
from functools import lru_cache
from math import factorial
import numberdb.sage as numberdb
from sage.rings.integer_ring import ZZ
from sage.rings.real_arb import RealBallField
from flint import acb, arb, acb_series, ctx
MAX_CONDUCTOR = 40
MAX_ORDER = 20
def discriminants(bound=MAX_CONDUCTOR):
answer = []
for q in range(2, bound + 1):
for D in (q, -q):
d = ZZ(D)
if (D % 4 == 1 and d.is_squarefree()) or (
D % 4 == 0 and (D // 4) % 4 in (2, 3)
and ZZ(D // 4).is_squarefree()):
answer.append(D)
return answer
def sage_ball(x, bits):
"""Copy binary midpoint and outward radius exactly, without decimal loss."""
R = RealBallField(bits)
m, e = x.mid().man_exp()
r, f = x.rad().man_exp()
return R(ZZ(int(m)) * ZZ(2)**int(e),
ZZ(int(r)) * ZZ(2)**int(f))
@lru_cache(maxsize=None)
def completed_jet(D, digits=100):
D = int(D)
if D == 1 or D not in discriminants(abs(D)):
raise ValueError('D must be a nontrivial fundamental discriminant')
bits = max(640, numberdb.bits(digits, losing=300))
with ctx.workprec(bits):
old_cap = ctx.cap
ctx.cap = 2 * MAX_ORDER + 1
try:
q, a = abs(D), int(D < 0)
s = acb_series([acb(1) / 2, 1], prec=2 * MAX_ORDER + 1)
L = acb_series([], prec=2 * MAX_ORDER + 1)
weights = [int(ZZ(D).kronecker(r)) for r in range(1, q + 1)]
assert sum(weights) == 0
for r, chi in enumerate(weights, 1):
if chi:
L += chi * s.zeta(acb(r) / q)
L *= (-s * arb(q).log()).exp()
F = (s * (arb(q) / arb.pi()).log() / 2).exp() * ((s + a) / 2).gamma() * L
assert all(F[k].is_finite() and F[k].imag.contains(0)
for k in range(2 * MAX_ORDER + 1))
# Odd derivatives vanish by the quadratic functional equation.
assert all(F[k].real.contains(0) for k in range(1, 2 * MAX_ORDER + 1, 2))
return tuple(F[k] for k in range(2 * MAX_ORDER + 1))
finally:
ctx.cap = old_cap
@lru_cache(maxsize=None)
def central_balls(D, digits=100):
bits = max(640, numberdb.bits(digits, losing=300))
with ctx.workprec(bits):
F = completed_jet(D, digits)
values = []
for m in range(MAX_ORDER + 1):
b = F[2*m].real * factorial(m)
assert b.is_finite() and b.rel_accuracy_bits() >= numberdb.bits(digits) + 30, (D, m, b)
values.append(sage_ball(b, bits))
return tuple(values)
class QuadraticCentral(numberdb.Generator):
table = os.environ.get('NUMBERDB_TABLE', 'T719')
parameters = ('D', 'm')
type = 'R'
digits = 100
rigour = 'proven'
def enumerate(self):
for D in discriminants():
for m in range(MAX_ORDER + 1):
yield {'D': D, 'm': m}
def value(self, params, digits):
D, m = int(params['D']), int(params['m'])
if not 0 <= m <= MAX_ORDER:
raise ValueError('This generator implements orders 0 through 20')
return central_balls(D, digits)[m]
if __name__ == '__main__':
g = QuadraticCentral()
if '--publish' in sys.argv:
g.publish(removing=False)
else:
print(g.verify(sample=None))