zeta(s) and zeta(s, a), also riemannzeta(s) and hurwitzzeta(s, a), were refused by name and are now
Entity.Zetaf, built by MathS.Zeta: the Hurwitz zeta function of DLMF 25.11, sum_(n >= 0) 1/(n + a)^s
continued to every s but its pole at 1, with no value at a = 0, -1, -2, ..., and the Riemann one at
a = 1. zeta alone is still a variable and zeta (s) with a space the product zeta * s, as gamma is.
It is exact at s = 0 and the even numbers, zeta(2m) a rational times pi^(2m), and at s = -n, where it
is -B_(n + 1)(a)/(n + 1) for every rational a. At a whole s >= 2 and a whole or half-whole a it is
written in zeta(s), so zeta(3, 1/2) is 7 zeta(3). The pole and a non-positive whole a are NaN.
Elsewhere it is evaluated to the working precision, for real and complex s and a, by the
Euler-Maclaurin formula, summing to w = a + N with w at least 0.4 W + |s|/2 for W working digits.
Digits lost to cancellation, left of 0 or near a zero, are counted and the sum taken again with as
many more, and the Riemann function left of 0 is reflected through Gamma(1 - s). 300 random points,
Riemann and Hurwitz, real and complex, a negative and complex, agree with mpmath to 5e-100 at 100
digits, as does the first zero on the critical line at the decimals written, and zeta(3) to 200
digits.
Its derivative in a is -s zeta(s + 1, a); in s it is left a derivative. It prints as zeta(s) and
zeta(s, a), draws as \operatorname{\zeta}, and exports to sympy.zeta. Neither compiler has it, and
Binders.Refusal names it, so Compile and MathS.Shaders decline it with one message.
gradient(f, x), divergence(F, x) and curl(F, x) are computed into derivatives when parsed, as
jacobian is, in the variables listed as a vector or one name. The gradient and the curl are columns,
and the curl is taken in three variables only. One argument is refused saying to give the
variables: gradient(x^2) and divergence(x) were refused by name, and curl(x) was a product. grad and
div stay variables.
Part of #2182.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The names decided on #2182 (comment of 2026-11-15, edited 2026-11-16): the Riemann and Hurwitz zeta functions, and the gradient, divergence and curl, spelled out.
Zeta
zeta(s)andzeta(s, a), read likegamma, with DLMF 25.11's Hurwitz convention;riemannzeta(s)andhurwitzzeta(s, a)are accepted on input. One node,Zetaf(Argument, Parameter): the Riemann function isa = 1, andzeta(s, 1)prints aszeta(s).zetaalone stays a variable andzeta (s)with a space stayszeta * s, asgamma (s)does.ZetaandHurwitzZetaare not read.a(to n = 300), so ζ(−1) = −1/12 and ζ(−11) = 691/32760; a whole s ≥ 2 with a whole or half-wholeawritten in ζ(s): ζ(2, 3) = π²/6 − 5/4, ζ(3, 1/2) = 7ζ(3). The pole s = 1 and a = 0, −1, −2, … areNaN, asgamma(0)is; the domain condition isnot s = 1 and (not a in ZZ or a > 0).a, real or complex; digits lost to cancellation are counted and the sum is taken again with that many more; the Riemann function left of 0 is reflected through Γ(1 − s) (DLMF 25.4.1). It declines beyond about |s| ≈ 40,000.areal in [−6, 6] and complex) at 100 digits, worst relative error 4.9e-100. ζ(1/2 + 14.134725141734693790457251983562i) agrees with mpmath at 200 digits to all 100; ζ(−60.5, 0.7) to all 100 (mpmath at its default precision is wrong there).derivativenode. Printszeta(s); LaTeX\operatorname{\zeta}\left(s\right)by the register's rule for a Greek letter that could be a variable (asphiis\operatorname{\varphi}); SymPysympy.zeta(s, a). Not compiled (no sound algorithm over double); the refusal goes throughBinders.Refusal, soMathS.Shadersdeclines with the same message.The gradient, divergence and curl
gradient(f, [x, y, z])divergence(F, [x, y, z])curl(F, [x, y, z])[∂F₃/∂y − ∂F₂/∂z, ∂F₁/∂z − ∂F₃/∂x, ∂F₂/∂x − ∂F₁/∂y]jacobiantakes themcurlwith other than 3 variables, or a field of the wrong lengthInvalidArgumentParseExceptionat parse time, ascrossdoesgradient(x^2),divergence(x),curl(F)FunctionArgumentCountException, saying to give the variablesgrad(f, x),div(F, x)grad,div,curlalone stay variablesChecked against the definitions and against
jacobian(the gradient is its transposed row, the divergence its trace, the curl from its off-diagonal entries); div curl F = 0 and curl grad f = 0 hold at negative and complex sample points.Records
BREAKING-CHANGES.md, measured on the 2.7.0 package: the zeta names threwUnrecognizedFunctionParseException;gradient(x^2),divergence(x)andcurl(x)were products; the two-argument operators were parse errors.curl(x)becoming a refusal follows #2453's treatment ofgradientanddivergence: a name in the register does not read as a product. The grammar adds the six names and removes the five refusals; master's grammar was regenerated unchanged first and matched byte for byte.Full check on this commit: 20,736 unit tests, 0 failed; MCP 450, Terminal 69, F# 134, Interactive 19; AOT 81/81; BoundCheck 0 disagreements, RootCheck 596/596, CasBench 120/121 with 0 wrong, SimpSweep 10463/10463, RuleCheck clean, CanonCheck and Confluence at their baselines.
Not in this PR: limits through zeta stay unevaluated, there are no integration rules for it, and Comparison.md (a measured table) updates on the next
sympyparityrun.Closes #2182.
🤖 Generated with Claude Code