Skip to content

am_series keeps the power it is asked for - #2303

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-series-keeps-the-power-it-is-asked-for
Oct 31, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-series-keeps-the-power-it-is-asked-for

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Catalogue.Series and am_series document their degree as the highest power kept, but they passed it to MathS.Series, whose argument counts terms. The catalogue now passes one term more.

am_series master and 2.6.0 now
sin(x), degree 7 x ^ 5 / 120 - x ^ 3 / 6 + x x ^ 5 / 120 - x ^ 7 / 5040 - x ^ 3 / 6 + x
sin(x), degree 1 0 x
e^x, degree 1 1 1 + x
  • Degree 1 is what the tool offers for linearising a model, and it gave the constant.
  • MathS.Series is unchanged. Its documentation called the argument the polynomial's degree, while its own examples count terms, so the documentation now says so.
  • CatalogueTest checks that the highest power kept is the one asked for, at degrees 0, 1, 2 and 7. ToolsTest.Series used to pin x⁵ at degree 7, and now checks x⁷ and degree 1.
  • The suite, the trio, F#, AOT and the eight harnesses pass.

Fixes #2299.

🤖 Generated with Claude Code

Catalogue.Series and the MCP tool am_series document their degree as
the highest power kept, and passed it to MathS.Series.Maclaurin and
Taylor, whose second argument is the number of terms. So the highest
power kept was one less than asked: sin(x) to degree 7 stopped at
x ^ 5, and degree 1, which am_series offers for linearising a model,
gave the constant term alone, 0 for sin(x) and 1 for e^x. The
catalogue now passes one term more than the degree. 2.6.0's am_series
called MathS.Series directly and answered the same.

MathS.Series is unchanged. Its documentation called the argument the
degree of the polynomial, and its own examples show it counts terms,
Maclaurin(Sin(x), 4, x) stopping at x ^ 3, so the documentation now
says that.

CatalogueTest asks for the highest power at degrees 0, 1, 2 and 7, and
the pin beside it takes one term more. ToolsTest.Series, which pinned
degree 7 at x ^ 5, takes x ^ 7 and degree 1. The suite, the trio, F#,
AOT and the eight harnesses pass.

Fixes #2299.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Oct 31, 2026
@Rafael-SOWNet Rafael-SOWNet moved this from Todo to In review in AngouriMath Oct 31, 2026
@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.76%. Comparing base (c633c41) to head (78d3477).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2303      +/-   ##
==========================================
+ Coverage   86.74%   86.76%   +0.02%     
==========================================
  Files         310      310              
  Lines       67973    67974       +1     
  Branches    19744    19736       -8     
==========================================
+ Hits        58961    58976      +15     
+ Misses       4880     4874       -6     
+ Partials     4132     4124       -8     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.31% <100.00%> (+0.02%) ⬆️
fsharp 32.97% <ø> (ø)
interactive 40.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
Sources/AngouriMath/Convenience/MathS.cs 90.51% <ø> (ø)
Sources/AngouriMath/Core/Operations/Catalogue.cs 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

🚀 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 a435926 into master Oct 31, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Oct 31, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the a-series-keeps-the-power-it-is-asked-for branch October 31, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

am_series and Catalogue.Series keep one power fewer than the degree asked for

1 participant