Skip to content

AGENTS.md: three things the last round taught - #707

Merged
Rafael-SOWNet merged 1 commit into
ASC-Community:masterfrom
Rafael-SOWNet:docs/agents-md-update
Aug 4, 2026
Merged

Rafael-SOWNet merged 1 commit into
ASC-Community:masterfrom
Rafael-SOWNet:docs/agents-md-update

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

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. mod took 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 a NaN, since it is the same distinction one level down.

Stringize has 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. Latexise is 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.

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

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.58%. Comparing base (90c00a8) to head (48fed5b).
⚠️ Report is 79 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Rafael-SOWNet
Rafael-SOWNet merged commit f81d7ac into ASC-Community:master Aug 4, 2026
26 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the docs/agents-md-update branch August 4, 2026 23:27
@Happypig375

Copy link
Copy Markdown
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.

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.

2 participants