Skip to content

Commit 46ac7c4

Browse files
Give every member of AngouriMath.Extensions a worked, executed example (#585, #746 item 4) (#1029)
* Give every member of AngouriMath.Extensions a worked example (#585) All 89 public members of the namespace carried a <summary> and none carried an <example>, which is the whole of the library's second-largest public surface with nothing showing what a member is for. Each now has one, and each is a case where the answer is worth seeing rather than a restatement of the signature: that substituting a pair of variables is sequential and so does not swap them, that 0.1 as a double converts to the binary value it actually holds and as a decimal to 1/10, that the two one-sided limits of 1/x at zero differ and NaN is therefore the claim that the two-sided one does not exist, that an integral with no elementary antiderivative comes back as its own node. A documented output is a promise the repository makes, so none of these is typed from memory: ExtensionsExampleTest asserts every one of them against the value the member returns, all 89 pinned by 59 facts. A change of answer now fails a test rather than leaving a wrong claim standing in the XML docs. Two of the three files are generated, so the examples go into the generator and the file is regenerated from it: the interval and equation-system templates carry a printed-value sample per type, and CompilationExtensions.tt computes its example from the arity it is emitting. Regenerating AdditionalExtensions.cs also restores the "this file is auto-generated" banner it had lost, and brings the EquationSystemFunctionPattern template back in step with the Matrix return type the file has had since Tensor was renamed. No behaviour changes; the only executable code added is the test. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bjumi5K7fg8yx6UK1mZTQd * Date the new test file to the year it was written Sources/.editorconfig pins the header per directory, so a new file needs its own scope or it ships with a copyright four years out of date. --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 875bd56 commit 46ac7c4

9 files changed

Lines changed: 1532 additions & 63 deletions

File tree

‎Sources/.editorconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,5 @@ file_header_template=\nCopyright (c) 2019-2026 Angouri.\nAngouriMath is licensed
9090

9191
[Tests/AotSmokeTest/*.cs]
9292
[Tests/UnitTests/Algebra/SolveTest/CalculusEquationTest.cs]
93+
[Tests/UnitTests/Convenience/ExtensionsExampleTest.cs]
9394
file_header_template=\nCopyright (c) 2019-2026 Angouri.\nAngouriMath is licensed under MIT.\nDetails: https://github.com/asc-community/AngouriMath/blob/master/LICENSE.md.\nWebsite: https://am.angouri.org.\n

‎Sources/AngouriMath/Convenience/AdditionalExtensions.cs‎

Lines changed: 434 additions & 48 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)