back to table · edit · history · where entries came from · files · download
646 bytes, as of the version from 2026-11-18 08:38 (current). Recorded here, not run.
import json,pathlib
import numberdb.sage as numberdb
import mpmath as mp
from sage.env import SAGE_VERSION
p=pathlib.Path(__file__).parent
rows=json.loads((p/'values-for-check.json').read_text())['records']
results=[]
with mp.workdps(180):
for row in rows:
k=int(row['params']['k']);x=mp.mpf(64)/(k*k)
h=mp.hyp2f1(mp.mpf(1)/4,mp.mpf(1)/4,1,x)**2
v=mp.mpf(row['number']);e=abs(h-v);ok=e<mp.mpf('1e-99')
assert ok
results.append({'k':k,'difference':mp.nstr(e,25),'pass':bool(ok)})
print('EXTRA '+json.dumps({'hypergeometric_squared':results,'working_dps':180,'bits100plus128':numberdb.bits(100,losing=128),'sage_version':SAGE_VERSION}))