import mpmath as mp
from fractions import Fraction
mp.mp.dps = 130
def watts(r):
r = Fraction(r) # exact width/height ratio
if r < 1:
raise ValueError("Use the rotation representative r >= 1")
rr = mp.mpf(r.numerator) / r.denominator
q = mp.exp(-mp.pi * rr)
x = (mp.jtheta(2, 0, q) / mp.jtheta(3, 0, q))**4
a, b = mp.mpf(1)/3, mp.mpf(2)/3
c = mp.gamma(b)/(mp.gamma(4*a)*mp.gamma(a))
c *= x**a * mp.hyp2f1(a, b, 4*a, x)
return c - mp.sqrt(3)/(2*mp.pi)*x*mp.hyper([1, 1, 4*a], [2, 5*a], x)
watts(Fraction(2, 1)) # numerical example; not a certified enclosure
# Stored default: every reduced a/b with 1 <= b <= a <= 8,
# in increasing order, including the intrinsic square (22 representatives).
Sage 10.9 with FLINT/Arb ball arithmetic encloses modular lambda, gamma factors and the ordinary hypergeometric functions [4]. Exact rational aspect ratios are enclosed before evaluation; the derived cross-ratio and arithmetic error propagate throughout. At the square, $x=C(1)=1/2$ follows from symmetry and duality, while $W(1)$ remains an inexact numerical enclosure. All 22 outputs are finite and satisfy the event bounds. Computation at 461 bits supports 100 significant decimal digits, with a minimum measured relative accuracy of 448 bits and at most one bit of cancellation.
The attached generator and numerical evidence record the actual computations and controls. A separate mpmath theta/integral implementation checks every stored decimal interval using the double integral above, with $t=x s^3$ to remove the outer endpoint singularity. It checks the elliptic-integral aspect relation, the separate square closed form, and the algebraic value $\lambda(i\cdot2)=17-12\sqrt2$. Changed probabilities, a two-color factor and nonfinite values are rejected. This comparison gives independent implementation evidence, not rigorous quadrature error bounds. An additional full check replaces modular lambda and both hypergeometric calls by explicit positive theta and hypergeometric series with geometric tail bounds at 512 bits. All 22 alternate enclosures overlap the production balls and lie within the stored decimal intervals, with at least 500 bits of relative accuracy; finite and narrow enclosures are required before comparison. NumberDB decimals express uncertainty of one unit in the last place.