back to table · edit · history · where entries came from · files · download
777 bytes, as of the version from 2026-12-02 04:01 (current). Recorded here, not run.
import json
from pathlib import Path
import numberdb.sage
from numberdb._write import to_text
w=Path('/work');doc=json.loads((w/'document.json').read_text());data=json.loads((w/'computation.json').read_text());scope={};exec(doc['Programs']['sage-local-root']['code'],scope)
checks=[]
for key in [(-23,59,20),(-15,19,5),(-91,97,63)]:
matches=[e for e in data['entries'] if tuple(e['params'][k] for k in ('D','p','a'))==key]
if not matches:
key=tuple(data['entries'][-1]['params'][k] for k in ('D','p','a'));matches=[data['entries'][-1]]
v=scope['local_singular_j'](*key);text=to_text(v,digits=100);assert text==matches[0]['number'];checks.append(dict(params=key,match=True,absolute_precision=int(v.precision_absolute())))
print(json.dumps({'checks':checks,'failures':[]}))