Repository navigation
AGENTS.md: three things the last round taught - #707
Merged
Rafael-SOWNet merged 1 commit intoAug 4, 2026
Merged
Conversation
Three additions, each from something that went wrong and was caught: Check the convention against the other systems rather than reasoning about it from memory. mod took the sign of the dividend until review pointed out that no mathematician means that by mod, and SymPy, Mathematica and Maxima all disagreed with it. Say "no answer" with null, not with an unevaluated node of the expression you were asked about. The latter looks honest and is a cycle that overflows the stack, which kills the process rather than raising anything catchable. Stringize has a contract -- parsing what it prints gives back what it printed -- and four node kinds broke it silently, one of them turning 64 into 512. Latexise is under no such obligation. Points at the new syntax reference, which is where what the parser accepts is now written down.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #707 +/- ##
==========================================
+ Coverage 80.99% 81.58% +0.58%
==========================================
Files 155 159 +4
Lines 13687 13787 +100
Branches 1957 2329 +372
==========================================
+ Hits 11086 11248 +162
+ Misses 1990 1887 -103
- Partials 611 652 +41 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
Latexise has a cross-repo contract with https://github.com/verybadcat/CSharpMath/blob/master/CSharpMath.Evaluation/Evaluation.cs so if roundtripping with that fails, submit a PR to CSharpMath repo too. |
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.
Each of these came from something that went wrong in #703, #705 and #706 and was caught — so each is written as a rule rather than as a story.
Check the convention, do not recall it.
modtook the sign of the dividend until @Happypig375 pointed out on #703 that no mathematician means that by mod. SymPy, Mathematica and Maxima all disagreed with what I had written. The rule now says to check the other systems and match the mathematics rather than the language you happen to be writing in — C's%is an operation on machine integers, and the library does not inherit it.Say "no answer" with
null. Handing back an unevaluated node of the expression you were asked about looks like the honest answer and is in fact a cycle: the caller evaluates it to compare, evaluating computes it, and computing arrives back where it started. That is #704 —lim x->2 signum(x)overflowed the stack, which kills the process rather than raising anything catchable. This sits in the section that already distinguishes an unevaluated result from aNaN, since it is the same distinction one level down.Stringizehas a contract: parsing what it prints gives back what it printed. Four node kinds broke it silently in #706, one of them printing an expression worth 64 as one worth 512. If a node's usual notation is not in the grammar, print the function call the parser does have.Latexiseis under no such obligation, since nothing parses LaTeX.Also points at
Sources/AngouriMath/Docs/Usage/Syntax.md, added in #706, which is now where what the parser accepts is written down.Documentation only.