Repository navigation
Read a grown derivatives' quotient in a limit by its terms - #2399
Merged
Rafael-SOWNet merged 1 commit intoNov 9, 2026
Merged
Conversation
l'Hopital's rule bounds how much its derivatives' quotient may grow, and a quotient past the bound was taken only where it had a value at the point. (sqrt(x) - erf(x)) / x at 0 from the right steps to 1/2 * x^(-1/2) - 2 / sqrt(pi) * e^(-x^2), which is +oo there and has no value, so the limit was left unevaluated where 2.6.0 answered +oo. Written (g - 0) / (x - 0) the same quotient fit inside the bound, by the two nodes the zeros add. Such a quotient is now also read a term at a time from one side: each term a value at the point, or factors with non-zero values there times a negative power of the distance to it, a pole whose sign the side decides. Poles of one sign are that infinity; of both signs, or a non-integer power from the left, the quotient is declined as before. Asking the grown quotient's limit with the rule kept out of it answered the same, but its descent took seconds on the quotients that grow the most and thirty on one of them; this costs a substitution per term. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2399 +/- ##
==========================================
- Coverage 86.81% 86.80% -0.02%
==========================================
Files 312 312
Lines 69272 69330 +58
Branches 20202 20230 +28
==========================================
+ Hits 60141 60184 +43
- Misses 4913 4919 +6
- Partials 4218 4227 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Rafael-SOWNet
deleted the
feature/limit-of-a-grown-quotient-without-another-step
branch
November 9, 2026 13:48
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.
l'Hopital's rule bounds how much its derivatives' quotient may grow. A quotient past that bound was taken only where it had a finite value at the point.
(sqrt(x) - erf(x)) / xat 0 from the right steps to1/2 * x^(-1/2) - 2 / sqrt(pi) * e^(-x^2), which is+oothere and has no value, so master left the limit unevaluated where 2.6.0 answered+oo. Written(g - 0) / (x - 0), the same quotient fit inside the bound by the two nodes the zeros add. That is the only reasonfloor(sqrt(x) - erf(x))at 0 from the right still answers on master, since its sign is read from that slope.The fix. For a one-sided limit at a finite point, a quotient past the bound is now also read a term at a time. Each term is either a value at the point, or a negative power of the distance to the point times factors with non-zero values there: a pole whose sign the side decides. Poles of one sign give that infinity. Poles of both signs, a non-integer power from the left, or anything else are declined as before. From the left,
(sqrt(x) - erf(x)) / xstays unevaluated. Its limit is-2/sqrt(pi) - oo i, a directed complex infinity.A first version asked the grown quotient's limit with the rule kept out of it. It answered the same, but limitcheck found 13 new limits that no longer finished in 5 s. The descent took seconds on the quotients that grow the most, and 30 s on
cos(tanh(x))^log(x + 1, tanh(x)). Reading the terms costs a substitution each.Measured on 2.6.0, master (69aa9bd) and this branch, at 0 from the right:
(sqrt(x) - erf(x)) / x+oo+oo(sqrt(x) + erf(x)) / x+oo+oo(erf(x) - sqrt(x)) / x-oo-oo(x^(1/3) - erf(x)) / x+oo+oo(sqrt(x) - erf(x)) / (2 * x)+ooOnly the last row changes against 2.6.0, and a BREAKING-CHANGES entry records it. Each takes about 0.2 s.
limitcheck, 42 seeds at depth 3 with 600 expressions each, against master: identical, with no losses, wrong answers or new timeouts.
Checks: the full suite passed (19199 tests), as did the MCP, terminal, interactive and F# wrapper suites, the AOT build and the eight harnesses.
New test:
AGrownQuotientIsReadWithoutAnotherStepTest.🤖 Generated with Claude Code