Repository navigation
Turn l'Hôpital away from a quotient whose whole powers grow - #2357
Merged
Rafael-SOWNet merged 2 commits intoNov 4, 2026
Merged
Conversation
GrewTooMuch turned the rule away where a quotient grew in nodes, and a chain whose divisor is a reciprocal power, x^n / (1 / g^k), grows in its exponents instead: the derivative of 1/g^k is over g^(2k), so k doubled at each step with the node count flat, and the inner limits expanded the powers. The limit of (-ln(2)/ln(x))^(e^x - 1) at 0 from the right went 6, 12, 24, ... and did not finish in ten minutes; it is 1, which 2.6.0 answered and #2306 stopped answering (bisected: #2306's factor taken out of a sum changed the route into this chain). The spelling with log(x, 1/2) and sgn(x) was 0 in 2.6.0 and hung on master. The sum of the whole exponents is measured as the nodes are, with the same room, the larger of eight more and three fifths again: a chain that is getting somewhere lowers its degrees. Both limits are 1, in 6 s and 3.4 s. limitcheck at SEED=16, and at DEPTH=3 on SEED=19 and 23, changes only the limit that did not finish; 752 limit tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2357 +/- ##
==========================================
+ Coverage 86.76% 86.77% +0.01%
==========================================
Files 312 312
Lines 68783 68786 +3
Branches 20037 20039 +2
==========================================
+ Hits 59679 59692 +13
+ Misses 4915 4909 -6
+ Partials 4189 4185 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…he hang The 0^0 limit takes about 6 s here and past a minute on CI's Windows runner, whose suite took 19 m 54 s against 7 m; a minute's cap measured the runner. Before the fix it did not finish in ten minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rafael-SOWNet
deleted the
a-quotient-whose-powers-grow-is-not-differentiated
branch
November 4, 2026 00:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A hang since #2306, and a wrong answer since before 2.6.0, in one l'Hôpital chain. limitcheck found it at
DEPTH=3,SEED=23. No issue was filed.(-ln(2)/ln(x))^(exp(x) - 1)1, 4.5 s1, 6.1 s(log(x, 1/2))^(exp(x) - sgn(x))01, 3.4 sThe chain. It's the form 0^0, and its exponent's logarithm is a 0·∞ product. Written as
x^n / (1 / g^k)withg = e^(-1/x) - 1after the substitution to +oo, each application differentiates1/g^kinto a quotient overg^(2k). So k went 6, 12, 24, …, every quotient was asked twice per depth, and the inner limits expanded the growing powers (stack:PolynomialLongDivision→DivideOnePolynomial→Expand).GrewTooMuchturns a step away by node count, and(…)^12and(…)^24have the same nodes.MaxlHopitalApplicationswas never reached, because the cost is inside each application.Why it started. Bisected to #2306 ("A factor a numerator's terms hold to a power cancels"). Before it, the limit took a different arrangement at its fourth step and settled in 4.4 s. The l'Hôpital traces of the two builds agree through three levels and their simplified results. #2306 changed which route is reached afterwards, not the simplification of these quotients, so this does not undo it.
The fix.
GrewTooMuchalso adds up the quotient's whole exponents, with the same room as for nodes: the larger of eight more and three fifths again. A chain that is getting somewhere lowers its degrees.limitcheck at
SEED=16, and atDEPTH=3onSEED=19and23, changes only the limit that did not finish, which now agrees with the values. Every other answer and decline is master's. The 752 limit tests pass,1/x^2 - 1/sin(x)^2among them; its chain is the one the node budget's comment was written for.Tests:
AQuotientWhosePowersGrowIsNotDifferentiatedTest, 5 cases. The two 0^0 limits fail on master by the one-minute cap; the three chains that settle pass on both. The full suite, AOT and the nine harnesses pass. There is a BREAKING-CHANGES entry, measured on 2.6.0.🤖 Generated with Claude Code