# Download the attached generate.py into the current directory.
from generate import volume
volume(4, (3, 3), 'hyp', digits=100)# Hyperelliptic components only, with labelled zeros and area one.
# zeros=1: H(2*g-2); zeros=2: H(g-1, g-1). See CMSZ, Section 6.5.
import numberdb.sage as numberdb
from math import factorial, prod
from sage.rings.integer_ring import ZZ
from sage.rings.rational_field import QQ
from sage.rings.real_arb import RealBallField
def hyperelliptic_volume(g, zeros=1, digits=100):
g = ZZ(g)
if g < 2 or zeros not in (1, 2):
raise ValueError('Use genus g >= 2 and one or two zeros.')
def df(n):
return prod(range(n, 0, -2))
if zeros == 1:
q = QQ(2 * df(2*g - 3)) / (factorial(2*g + 1) * df(2*g - 2))
else:
q = QQ(8 * df(2*g - 2)) / (factorial(2*g + 2) * df(2*g - 1))
field = RealBallField(numberdb.bits(digits, losing=64))
return field(q) * field.pi()**(2*g)
hyperelliptic_volume(5, zeros=2, digits=100) # H(4,4), beyond the stored range.The exact rational coefficients of $\pi^{2g}$ are transcribed from [1], Table 1, which uses numbered zeros. Each rational is converted directly to an Arb ball and multiplied by a certified power of $\pi$. A 64-bit working guard beyond the requested 100 significant digits gives a measured minimum of 393 bits of relative accuracy. A separate 512-bit MPFI calculation is contained in the exact uncertainty interval asserted by every written decimal.
All 25 coefficients were checked visually against the source table. Twenty-three also agree exactly with the surface-dynamics transcription in its $\zeta(2g)$ normalization; that software cites EMZ, so this is a transcription check rather than an independent derivation. Independent rational generating-series calculations from [4] recover the six minimal-component values, and the hyperelliptic formulas from [3] and [4] recover all six hyperelliptic values, covering nine distinct entries. The principal-stratum saddle-connection ratios for genera two through four agree with EMZ Table 2. The remaining general nonhyperelliptic multizero coefficients are source transcriptions. The generator, argument-selection justification, checks, controls and numerical evidence are attached.