Skip to content

Write a power of the reciprocal as a power of the variable at infinity - #2362

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
fix/slow-quotient-over-log-of-a-root
Nov 4, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
fix/slow-quotient-over-log-of-a-root

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

ln(x) / ln(sqrt(x)) from the right at 0 took 13 s to answer 2, and ln(sin(x)) / ln(sqrt(x)) took over 20 s.

A one-sided limit at 0 is taken at infinity by putting 1/x for x, so a root of the variable arrives there as (1/x)^p, and nothing rewrote that. The quotients built from it never cancel. x^3 * sqrt(1/x) / (x^2 * (1/x)^(-1/2)) is 1, but l'Hôpital's rule differentiated it sixteen deep, in 1.6 s, and the first limit asked that question eight times.

(1/x)^p is x^(-p), and (-1/x)^p is (-1)^p x^(-p). Both are exact for real x > 0, which covers the whole of the way to +oo, and on the principal branch for any exponent. They are now rewritten where a limit at infinity begins. Both limits above take under 0.2 s, and no answer changes.

limitcheck, DEPTH=3, seeds 14, 16, 19, 23 and 26, against master 403394b:

master this branch
compared 25 961 25 963
the limit did not finish in 5 s 1 0
the limit is another value 6 6
the limit is NaN where the values settle 69 69

Suite, AOT and the harnesses are green locally.

Found by limitcheck at SEED=26, as log(sqrt(x), floor(x) + arctan(x)); no issue was filed.

🤖 Generated with Claude Code

A one-sided limit at 0 is taken at infinity by putting 1/x for x, so a root
of the variable arrives there as (1/x)^p, which nothing rewrote. The
quotients built from it never cancel: x^3 * sqrt(1/x) / (x^2 * (1/x)^(-1/2)),
which is 1, went to l'Hopital's rule sixteen deep in 1.6 s, and
ln(x) / ln(sqrt(x)) from the right at 0 asked it eight times on the way to
2 -- 13 s, and ln(sin(x)) / ln(sqrt(x)) over 20 s.

(1/x)^p is x^(-p), and (-1/x)^p is (-1)^p x^(-p), exactly for x real and
positive, which is the whole of the way to +oo; on the principal branch for
any exponent. Rewritten where a limit at infinity begins. Both of those are
now under 0.2 s. No answer changes.

limitcheck, DEPTH=3, seeds 14, 16, 19, 23, 26 against master 403394b: two
limits more answered, "did not finish in 5 s" 1 -> 0, the wrong values and
the NaNs unchanged. Found at SEED=26 as log(sqrt(x), floor(x) + arctan(x));
no issue was filed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Nov 4, 2026
@Rafael-SOWNet Rafael-SOWNet moved this from Todo to In review in AngouriMath Nov 4, 2026
@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.77%. Comparing base (403394b) to head (2044c1d).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2362      +/-   ##
==========================================
- Coverage   86.78%   86.77%   -0.02%     
==========================================
  Files         312      312              
  Lines       68818    68825       +7     
  Branches    20050    20053       +3     
==========================================
- Hits        59726    59720       -6     
- Misses       4909     4921      +12     
- Partials     4183     4184       +1     
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 Δ
...ns/Continuous/Limits/Solvers/Solvers.Definition.cs 91.28% <100.00%> (+0.32%) ⬆️

... and 7 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 43d9b81 into master Nov 4, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Nov 4, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the fix/slow-quotient-over-log-of-a-root branch November 4, 2026 06:30
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