back to table · edit · history · where entries came from · files · download
3684 bytes, as of the version from 2026-10-28 17:16 (current). Recorded here, not run.
"""Values of the Hardy Z-function -- numberdb.org/T586.
Run with SageMath, numberdb, and the attached source files in one directory:
sage -pip install numberdb
sage -python generate.py # verify all stored entries
sage -python checks.py # independent checks, no writes
A working Sage Cython compiler and FLINT are required. gram.py, stationary.py
and hardy_arb.pyx are generator dependencies. The stationary cover is rebuilt
from scratch once per process, proving the first 100 positive derivative
roots; exact symbolic argument identities never mean rounded stored inputs.
All values retain their signs. FLINT Hardy jets at 493 bits propagate the
full uncertainty of certified argument balls. Returned real balls are written
to 100 significant digits by numberdb. WORKING_GUARD=160 agrees with the
companion root generators; measured accuracy is in numerical-evidence.json.
To fill this authorized draft, pipe the key on stdin and set
NUMBERDB_KEY_FROM_STDIN=1 and NUMBERDB_PUBLISH=1. This writes draft entries
and attaches source files. It never offers, reviews or publishes a table.
"""
import os
import sys
from functools import lru_cache
import numberdb.sage as numberdb
from sage.rings.real_arb import RealBallField
from gram import gram_point
from stationary import root, bridge
WORKING_GUARD = 160
@lru_cache(maxsize=None)
def argument(identity, digits=100):
R=RealBallField(numberdb.bits(digits,losing=WORKING_GUARD))
if identity == '0':
return R(0)
family,index=identity.split(':')
if family == 'gram':
return gram_point(int(index),digits+10)
if family == 'stationary':
return root(int(index),digits+10)
raise ValueError('Unknown symbolic real argument')
@lru_cache(maxsize=None)
def value_ball(identity,digits=100):
prec=numberdb.bits(digits,losing=WORKING_GUARD)
value=bridge().jet(argument(identity,digits),1,prec)[0]
assert value.real().is_finite() and value.imag().is_finite() and value.imag().contains_zero()
result=value.real()
assert result.is_finite() and result.accuracy() >= numberdb.bits(digits)+20
return result
class HardyZValues(numberdb.Generator):
table='T586'
parameters=('t',)
type='R'
digits=100
rigour='proven'
files=('generate.py','gram.py','stationary.py','hardy_arb.pyx','checks.py',
'check.py','argument-selection.md','certification.md',
'numerical-evidence.json','skill-manifest.json')
def enumerate(self):
yield {'t':'0'}
for n in range(-1,201):
yield {'t':'gram:'+str(n)}
for j in range(1,101):
yield {'t':'stationary:'+str(j)}
def value(self,params,digits):
identity=params['t']
result={'number':value_ball(identity,digits)}
if identity=='0':
result['comment']=r'This is HREF{Values_of_the_Riemann_zeta_function_at_rational_numbers#1/2}[$\zeta(1/2)$], fixing the sign normalization.'
else:
family,index=identity.split(':')
result['param-latex']=('$g_{%s}$' if family=='gram' else '$c_{%s}$') % index
return result
if __name__=='__main__':
if os.environ.get('NUMBERDB_KEY_FROM_STDIN')=='1':
key=sys.stdin.read().strip()
if '=' in key:key=key.split('=',1)[1].strip().strip('\"\'')
os.environ['NUMBERDB_API_KEY']=key
generator=HardyZValues()
if os.environ.get('NUMBERDB_PUBLISH')=='1':
print(generator.publish(message='Store certified signed Hardy Z values at 303 intrinsic arguments'))
else:
report=generator.verify(sample=None)
print(report)
sys.exit(0 if report.ok else 1)