back to table · edit · history · where entries came from · files · download
2641 bytes, as of the version from 2026-12-02 10:07 (current). Recorded here, not run.
"""Reproduce T917, DeVicci's tesseract constant.
Requires SageMath and numberdb (tested: SageMath 10.9, numberdb 0.1.10).
sage -pip install numberdb
sage -python generate.py # read-only preview
sage -python generate.py --verify # compare every stored value
sage -python generate.py --publish # fill the authorized target draft
The sole value has no input: enumerate() yields one empty mapping. The exact
real-algebraic root x0 in (1,4/3) of 4*x^4-28*x^3-7*x^2+16*x+16 is selected
before taking its positive square root. Arb propagates its enclosure through
the square root at ceil(digits*log2(10))+64 bits (397 bits for 100 digits).
The measured output accuracy is 395 bits. A decimal's last place is uncertain
by one unit. The geometric optimality is the cited Shultz theorem, not a
consequence of polynomial root isolation. No credentials/provenance are stored
here; configure them in the submitting session. Publication of entries does
not offer or publish a draft. No removing=True replacement is performed.
"""
import sys
import numberdb.sage as numberdb
from numberdb._write import to_text
from sage.rings.rational_field import QQ
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
from sage.rings.qqbar import AA
from sage.rings.real_arb import RealBallField
def squared_edge():
ring = PolynomialRing(QQ, 'x')
x = ring.gen()
polynomial = 4*x**4 - 28*x**3 - 7*x**2 + 16*x + 16
selected = [r for r in polynomial.roots(AA, multiplicities=False)
if 1 < r < QQ(4)/3]
if len(selected) != 1:
raise ArithmeticError('The defining interval must select one root')
return selected[0]
class DeVicci(numberdb.Generator):
table = 'T917'
parameters = ()
type = 'R'
digits = 100
rigour = 'proven'
def enumerate(self):
yield {}
def value(self, params, digits):
if params:
raise ValueError('DeVicci\'s constant has no input parameters')
field = RealBallField(numberdb.bits(digits, losing=64))
result = field(squared_edge()).sqrt()
if not result.is_finite() or not result > 0:
raise ArithmeticError('A finite positive enclosure is required')
return result
if __name__ == '__main__':
generator = DeVicci()
if '--publish' in sys.argv:
generator.publish(removing=False)
elif '--verify' in sys.argv:
report = generator.verify(sample=None)
print(report)
if not report.ok:
raise SystemExit(1)
else:
print(to_text(generator.value({}, generator.digits), generator.digits))