Skip to content

Bring Syntax.md up to date with the functions that now exist - #834

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
docs/syntax-md-new-functions
Aug 9, 2026
Merged

Bring Syntax.md up to date with the functions that now exist#834
Rafael-SOWNet merged 2 commits into
masterfrom
docs/syntax-md-new-functions

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Collaborator

Syntax.md still listed floor, ceil, ceiling, round, min, max and gcd under Refused by name. Six of them have existed since #827 and #828, so the document told a caller the opposite of what the parser does.

AGENTS.md is explicit that this file has to be kept true when the grammar changes, and that a stale one is worse than none. I changed the grammar twice and did not update it either time — this is that debt.

The new entries say what each function does, not merely that it parses, because the conventions are the part a caller cannot guess:

  • floor and ceil round toward the infinities, not toward zero — floor(-3/2) is -2
  • round goes to the nearest even on a tie, so round(1/2) is 0 and round(5/2) is 2, and it is therefore not floor(x + 1/2)
  • all three take a complex argument componentwise
  • min/max/gcd are variadic and fold; min and max leave an unordered pair as written
  • gcd covers rationals — gcd(1/2, 1/3) is 1/6 — and leaves the polynomial case alone

The refused list is now just trunc, lcm, erf and conjugate.

Every claim was checked against a build, not written from memory: the seven values, that ceiling(x) prints back as ceil(x), that min(x, y) and gcd(x, y) stay as written, that the four remaining names still raise, and that re/im are still read as products.

Docs only.

Rafael-SOWNet and others added 2 commits August 9, 2026 01:28
Syntax.md still listed floor, ceil, ceiling, round, min, max and gcd under
"Refused by name". Six of them have existed since #827 and #828, so the document
was telling a caller the opposite of what the parser does -- and AGENTS.md is
explicit that a stale one of these is worse than none. I changed the grammar twice
and did not update it either time.

The entries say what each does rather than only that it parses, since the
conventions are the part a caller cannot guess: rounding toward the infinities
rather than zero, round going to the nearest even on a tie and so not being
floor(x + 1/2), the componentwise reading of a complex argument, min and max
leaving an unordered pair alone, and gcd covering rationals.

Every claim in the new text was checked against a build rather than written from
memory, including that the four still-refused names still raise and that re and im
are still read as products.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The same false claim #823 corrected in AGENTS.md -- "nothing parses LaTeX" -- was
in Syntax.md as well, and I fixed only the one I had been pointed at.
CSharpMath.Evaluation reads LaTeX back into an Entity and states the contract in
its own source, so the sentence was wrong in both places.

The point worth keeping is the one the correction adds: Latexise is still free to
use \frac and the rest, but a change to what it emits can break a downstream
project and nothing here will catch it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Rafael-SOWNet

Copy link
Copy Markdown
Collaborator Author

Added a second commit to the same file. Syntax.md repeated the claim #823 corrected in AGENTS.md — "nothing parses LaTeX" — and I had fixed only the copy I was pointed at. CSharpMath.Evaluation reads LaTeX back into an Entity and states the contract in its own source, so the sentence was wrong in both places.

The correction keeps the useful half: Latexise is still free to use \frac and the rest, but changing what it emits can break a downstream project and nothing in this repository will catch it.

@Rafael-SOWNet
Rafael-SOWNet merged commit 532d89c into master Aug 9, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant