offline_checks.py

back to table · edit · history · where entries came from · files · download

1388 bytes, as of the version from 2026-12-02 03:00 (current). Recorded here, not run.

import os,sys,json,hashlib
from pathlib import Path
import numberdb.sage as numberdb
from sage.rings.real_arb import RealBallField
from sage.rings.rational_field import QQ
import sage.version
from generate import GelfondSchneider
from numberdb._write import to_text
import dry_run
w=Path(os.environ.get('NUMBERDB_WORKDIR',Path(__file__).parent))
g=GelfondSchneider(); assert tuple(g.parameters)==() and list(g.enumerate())==[{}]
x=g.value({},100);assert type(x).__module__=='sage.rings.real_arb' and type(x).__name__=='RealBall'
assert x.is_finite() and not x.contains_zero()
record={'stored_number':to_text(x,100),'working_bits':512,'accuracy_bits':int(x.accuracy()),'lower':str(x.lower().exact_rational()),'upper':str(x.upper().exact_rational()),'radius_upper':str(x.rad().exact_rational()),'type':type(x).__module__+'.'+type(x).__name__,'skill_manifest':'agents/runs/20261202T025209Z-build-skills/manifest.json','skill_core_sha256':'29aacd00ed1383815a0cab1b22d62fd0cadfba271c7054be962c2ac6c4417c8c'}
print('ARTIFACT numerical-evidence.json '+json.dumps(record))
print('ARTIFACT dependency-versions.json '+json.dumps({'python':sys.version,'sage':sage.version.version,'numberdb':numberdb.__version__}))
print(json.dumps({k:record[k] for k in ('stored_number','working_bits','accuracy_bits','type')}))
status=dry_run.main([str(Path(__file__).with_name('generate.py'))]); assert status==0