import mpmath as mp
def M(k, working=150):
# Elliptic K uses parameter u. Quadrature here is heuristic.
with mp.workdps(working):
k = mp.mpf(k)
if not mp.isfinite(k) or k < 8:
raise ValueError("A finite real k >= 8 is required.")
alpha = (1-mp.sqrt(1-64/k**2))/2
def integrand(u):
if u == 0:
return mp.mpf(1)/4
return ((2*mp.ellipk(u)/mp.pi)**2-1)*(1-2*u)/(2*u*(1-u))
answer = mp.log(k)-mp.quad(integrand, [0, alpha/2, alpha])
return mp.nstr(answer, working-20)
# This reference selection is the integer range stored in the table.
for k in range(8, 33):
print(k, M(k))
# Compare higher working precision before trusting new quadrature values.
# The attached generator instead uses explicit, rigorous series-tail bounds.
The generator stores 100 significant digits from Arb enclosures with explicit omitted-tail bounds. For k>8 it sums the positive central-binomial moment series and bounds the remaining measure correction by x^(N+1)/(2(N+1)(1-x)), where x=64/k^2. The endpoint uses an absolutely convergent series in the elliptic parameter 1/2. Its exact dyadic coefficient convolution and tail proof are attached in numerical-evidence.md. Exact rational inputs, ball logarithms and propagated rounding errors are included; the weakest computed ball retained 406 accuracy bits, over 122 decimal digits.
A separate implementation using mpmath elliptic K and quadrature at 140 and 185 working decimal digits agrees with every one of the 25 recorded intervals. Direct two-angle integration of the original Laurent kernel also checks k=8,9,10,12,16,24,32 to roughly twelve decimal places. Nonzero known-answer and deliberately incorrect factor, power and elliptic-convention controls are retained. These quadrature checks are heuristic corroboration; the explicit series enclosures support the proven precision. The source's endpoint decimal differs at its last printed place and is used only as a limited external check, not as a 100-digit oracle. Executable checks and measured results are attached.