import numberdb.sage as numberdb
from sage.rings.rational_field import QQ
def eta(p, q, u):
def saw(n):
r = n % p
return QQ(0) if r == 0 else QQ(r)/QQ(p) - QQ(1)/QQ(2)
return -4*sum((saw(j)*saw(q*j+u) for j in range(p)), QQ(0))
print(eta(7, 2, 1))Computed by the finite sawtooth sum in exact Sage rational arithmetic. Every selected entry agrees with an independent exact calculation combining classical Dedekind reciprocity with weighted lattice-point counts from [1], equation (2.4).
Each value is also enclosed by the cotangent sum computed in Arb at 512 bits; all balls are finite, their radii are less than $2.64\times10^{-151}$, and nonzero values retain at least 496 bits of relative accuracy. Known zero and nonzero controls precede these checks. Conjugation, coordinate exchange, orientation reversal and the sum over all characters are checked across all 1744 unreduced labels through $p=20$. The attached generator, checks, argument-selection note and numerical evidence reproduce the computation.