Skip to content

The forward difference - #2201

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
the-forward-difference
Oct 29, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
the-forward-difference

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

forwarddifference(f, k) was reserved in #2184. It is now f(k + 1) − f(k), the forward difference with a step of 1, as in Mathematica's DifferenceDelta[f, k]. Like laplacian, it is written out when parsed and needs no node. Part of #2182.

Input Was (2.6.0) Now
"forwarddifference(k^2, k)".ToEntity().Simplify() throws UnhandledParseException 1 + 2 * k
"forwarddifference(2^k, k)".ToEntity() throws UnhandledParseException 2 ^ (k + 1) - 2 ^ k

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

forwarddifference(f, k) was reserved by name in #2184. It is now f(k + 1) - f(k), the forward
difference with a step of 1, as Mathematica's DifferenceDelta[f, k] is. It is written that way when
parsed, as laplacian is, and needs no node: forwarddifference(k^2, k) simplifies to 1 + 2 k, and
sum(forwarddifference(k^3, k), k, 1, 5) is 215, which is 6^3 - 1. A derivative in f is taken at
k + 1, as #2189 lets it be, so the difference of derivative(k^3, k) is 6 k + 3. It is taken in a
variable, and a number or a constant in that place is refused.

Part of #2182.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.55%. Comparing base (282157a) to head (c053d36).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2201      +/-   ##
==========================================
- Coverage   86.56%   86.55%   -0.01%     
==========================================
  Files         298      298              
  Lines       66592    66596       +4     
  Branches    19319    19320       +1     
==========================================
- Hits        57646    57645       -1     
- Misses       4868     4875       +7     
+ Partials     4078     4076       -2     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.11% <100.00%> (-0.01%) ⬇️
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/Core/Antlr/AngouriMathLexer.cs 99.21% <100.00%> (ø)
...ources/AngouriMath/Core/Antlr/AngouriMathParser.cs 87.77% <100.00%> (+0.02%) ⬆️
Sources/AngouriMath/Core/Antlr/ParsingHelpers.cs 93.47% <100.00%> (+0.29%) ⬆️

... and 6 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 76d334c into master Oct 29, 2026
36 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Oct 29, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the the-forward-difference branch October 29, 2026 13:55
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.

1 participant