Skip to content

Keep the evaluators' recursive frames to the arithmetic - #1928

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
interval-evaluation-keeps-its-recursion-frame-small
Oct 17, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
interval-evaluation-keeps-its-recursion-frame-small

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Master's C# Test has failed on macOS since 930c5ba: the test host crashes with a stack overflow in APowerOfALinearOverAPowerOfAQuadraticIntegralTest. Windows and Ubuntu are cancelled by fail-fast.

The crash is in IntervalEvaluation.Evaluate (and, once that is fixed, PreciseEvaluation.EvaluateNode), checking a partial-fraction split about 230 levels deep. Each evaluator recursed through one method that holds every arm, so each level's frame carried the temporaries and closures of all of them. Earlier masters were near the limit too: 67d8e8d overflows the same row on a 512 KB thread.

Here the arithmetic arms stay in the recursive method, and the rest move to a method that is not inlined. No answer changes.

Each row integrated on a thread of a fixed size:

512 KB 1 MB 2 MB
master 930c5ba overflow overflow ok
this branch ok ok ok

The suite passes locally: 15,531 passed, 0 failed (net10.0).

🤖 Generated with Claude Code

https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura

The interval and decimal evaluators each recursed through one method
holding every arm, so every level of a deep sum carried the temporaries
and closures of all of them. Checking a partial-fraction split of
sqrt(d+k*x)/(a+b*x+c*x^2)^3, about 230 levels deep, overflowed a 1 MB
stack, and the macOS runner's test host crashed on master.

The arithmetic arms stay in the recursive method; the rest move to a
method that is not inlined. The three rows of
APowerOfALinearOverAPowerOfAQuadraticIntegralTest now integrate on a
512 KB thread.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
@Rafael-SOWNet Rafael-SOWNet added this to the 2.6.0 milestone Oct 17, 2026
@Rafael-SOWNet
Rafael-SOWNet merged commit 987e0f5 into master Oct 17, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Oct 17, 2026
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