Skip to content

Ask the descent's own question once - #2383

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
feature/tanh-factor-at-zero
Nov 7, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
feature/tanh-factor-at-zero

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

The descent of a quotient asks for the quotient's whole limit when its parts read 0/0 or oo/oo. At the root of the descent, that is the question already being asked. The path that started the descent goes on to the indeterminate power, l'Hopital's rule and, at an infinity, the rewrites and Gruntz as soon as the descent has nothing to say. Asked from inside the descent as well, the whole limit descended again and repeated every step, including simplifying the expression moved out to infinity.

(1 - tanh(x)^2) * x * (1 + x^2) / tanh(x) at 0 from the right ran that simplification twice, nine seconds each time, before l'Hopital's rule answered 1 in 10 ms.

The descent no longer asks for the whole limit of its own root. Quotients below the root still ask for theirs.

Input, 0 from the right master This PR
(1 - tanh(x)^2) * x * (1 + x^2) / tanh(x) 18.4 s 9.9 s
(1 - tanh(x)^2) * x / tanh(x) 7.3 s 4.2 s

No answer changes. The new test row passes on master as well; it pins the answer of the case #2377's comment names, which was not tested. What remains of the time is Simplify on that product, which takes 8 s outside a limit as well. With a symbol in place of e^(2x) it takes 23 ms. That is a separate defect.

Measured

  • Suite, wrappers, AOT and the harnesses are green.
  • limitcheck at DEPTH=3, across 42 seeds against master: no answer differs. Three rows that ran past the 5 s cap on master now finish within it, with the same answer master gives when allowed to finish (probed alone on both builds):
    • log(2 ln(1/2), log(arcsin(x), x)) at 0 from each side stays unevaluated, 7.1 s and 6.3 s down to 5.2 s and 4.1 s.
    • (x^2 / sinh(x))^x at 0 two-sided stays NaN, 7.7 s down to 4.9 s. This is the convention x^x follows there.

Found while tracing a limitcheck row; no issue was filed.

🤖 Generated with Claude Code

The descent of a quotient asks the quotient's whole limit when its parts
read as 0/0 or oo/oo. At the root of the descent that is the question
being asked: the path that began the descent asks the indeterminate
power, l'Hopital's rule and, at an infinity, the rewrites and Gruntz, the
moment the descent has nothing to say. Asked from inside the descent as
well, it descended again and repeated every step of it, including
simplifying the expression moved out to infinity.

(1 - tanh(x)^2) * x * (1 + x^2) / tanh(x) at 0 from the right simplified
it twice, nine seconds each, before l'Hopital's rule answered 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Nov 7, 2026
@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.76%. Comparing base (2e2bf9d) to head (79359f7).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2383      +/-   ##
==========================================
- Coverage   86.77%   86.76%   -0.02%     
==========================================
  Files         312      312              
  Lines       69107    69110       +3     
  Branches    20155    20156       +1     
==========================================
- Hits        59971    59963       -8     
- Misses       4920     4930      +10     
- Partials     4216     4217       +1     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.30% <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 Δ
...nctions/Continuous/Limits/Solvers/Limit.Classes.cs 74.04% <100.00%> (+0.13%) ⬆️
...ns/Continuous/Limits/Solvers/Solvers.Definition.cs 90.33% <100.00%> (+0.04%) ⬆️

... and 8 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 0f2f41d into master Nov 7, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Nov 7, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the feature/tanh-factor-at-zero branch November 7, 2026 16:38
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