Bring Syntax.md up to date with the functions that now exist - #834
Merged
Conversation
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>
Collaborator
Author
|
Added a second commit to the same file. The correction keeps the useful half: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syntax.mdstill listedfloor,ceil,ceiling,round,min,maxandgcdunder 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:
floorandceilround toward the infinities, not toward zero —floor(-3/2)is-2roundgoes to the nearest even on a tie, soround(1/2)is0andround(5/2)is2, and it is therefore notfloor(x + 1/2)min/max/gcdare variadic and fold;minandmaxleave an unordered pair as writtengcdcovers rationals —gcd(1/2, 1/3)is1/6— and leaves the polynomial case aloneThe refused list is now just
trunc,lcm,erfandconjugate.Every claim was checked against a build, not written from memory: the seven values, that
ceiling(x)prints back asceil(x), thatmin(x, y)andgcd(x, y)stay as written, that the four remaining names still raise, and thatre/imare still read as products.Docs only.