You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Check 2.8's new LaTeX output against CSharpMath.Evaluation #2484
AGENTS.md (Latexize has a round trip too, and it is enforced in someone else's repository, from #822) asks that new Latexize output be checked against CSharpMath.Evaluation, with a PR there where it cannot read a command this library now prints. 2.8 adds LaTeX output that has not been checked; the check was skipped for the 2.8.0 release and is owed:
For each: parse into a MathList, evaluate back to an Entity, compare; where CSharpMath lacks a command, a PR there with a test, per AGENTS.md (the standard command wins).
Checked against CSharpMath with the published 2.8.0 package. For each row: Latexize, then LaTeXParser.MathListFromLaTeX, then Evaluation.Evaluate, then the result compared with the original entity.
Parsing: every row parses. They are now strict rows of CSharpMath's AngouriMathLatexSweepTests, in verybadcat/CSharpMath#338, which moves CSharpMath to 2.8.0. On 2.8.0, Evaluation passes 968/968, Core 1,584/1,584 and Rendering 1,241/1,241. Two Evaluation rows had to change: they pinned [1, 2]^2 squared entry by entry, which 2.8.0 leaves written.
Activity
Rafael-SOWNet commentedon Nov 17, 2026
Checked against CSharpMath with the published 2.8.0 package. For each row:
Latexize, thenLaTeXParser.MathListFromLaTeX, thenEvaluation.Evaluate, then the result compared with the original entity.Parsing: every row parses. They are now strict rows of CSharpMath's
AngouriMathLatexSweepTests, in verybadcat/CSharpMath#338, which moves CSharpMath to 2.8.0. On 2.8.0, Evaluation passes 968/968, Core 1,584/1,584 and Rendering 1,241/1,241. Two Evaluation rows had to change: they pinned[1, 2]^2squared entry by entry, which 2.8.0 leaves written.Evaluating back: most do not come back.
product(1 - 1/p^2, p in {2, 3, 5})\prod_{p \in \left\{ 2, 3, 5 \right\}} …∏partialderivative(L, q),(L, q, 2)\frac{\partial}{\partial q}L,\frac{\partial^{2}}{\partial q^{2}}L𝜕zeta(s),zeta(s, a)\operatorname{\zeta}\left(s\right)ζbeta(a, b)\operatorname{B}\left(a, b\right)Bnorm(v, p)\left| v \right|_{p}‖ ‖primefactors(360)\operatorname{primefactors}\left(360\right)det(A)\det\left(A\right)dettrace(A)\operatorname{tr}\left(A\right)trA[1, 2]{A}_{1,2},in a subscriptfactorization(360)2^{3} \cdot 3^{2} \cdot 52^3 * 3^2 * 5, the number, as expecteddot(a, b)a \cdot ba * bcross(a, b)a \times ba * btranspose(A){A}^{\mathrm{T}}A ^ T, a power of a variableTgradient(f, [x, y])bmatrixof derivativesNodes from before 2.8 fare the same, so this gap is in CSharpMath's evaluator and 2.8 did not open it:
\sum,max,gcd,\lfloor x \rfloorand set-builder{ x : x > 0 }are all evaluation errors.binomial(n, k)comes back asn / k.gamma,derivative,integral,limit, matrices,piecewise,provided,mod,phiand the logic come back equal.The silent misreadings are the worse half:
binomial(n, k)comes back asn / k.transpose(A)comes back asA ^ T.dotandcrosscome back as products. A product of two vectors is written, not computed, since 2.8, so this one is at least not a wrong value.Owed on the CSharpMath side, where each is evaluator work:
^{\mathrm{T}}read as the transpose, and\binomas the binomial.\prod,\partial,\det,\operatorname{tr},\zetaandBas functions,\| \|as the norm, andA_{1,2}as an entry.I'm keeping this open for those.