Repository navigation
Answer a limit of a quotient whose parts tend to a determinate form - #2410
Merged
Merged
Conversation
l'Hopital's rule asks the limit of the numerator and the denominator, each whole, and went on only for 0/0 and oo/oo. Where the two make a determinate form it returned nothing, though the quotient of the two limits is the limit. The descent reads a part term by term and can see an indeterminate form the whole does not have: cot(x) - 1/x at 0 is +oo - +oo to it and 0 asked whole, so (cot(x) - 1/x) / ln(x) at 0, 0 over -oo, was left unevaluated. A finite limit over an infinite one is now 0, an infinite one over a finite nonzero one is the signed infinity, and a finite one over a finite nonzero one is their quotient. Asked two-sided at a point, it answers only where the quotient is real on both sides, the convention x^x at 0 is held to: sinh(-1) (x^x - 1) stays NaN. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2410 +/- ##
==========================================
- Coverage 86.82% 86.82% -0.01%
==========================================
Files 312 312
Lines 69444 69457 +13
Branches 20286 20289 +3
==========================================
+ Hits 60292 60303 +11
- Misses 4921 4923 +2
Partials 4231 4231
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
(cot(x) - 1/x) / ln(x)at 0 was left unevaluated; it is 0.l'Hôpital's rule asks the limit of the numerator and the denominator, each whole, and went on only for 0/0 and oo/oo. Where the two make a determinate form it returned nothing. The descent reads a part term by term, so
cot(x) - 1/xis+oo - +ooto it and 0 asked whole: 0 over-ooreached the rule and was declined. Now a finite limit over an infinite one is 0, an infinite one over a finite nonzero one is the signed infinity, and a finite one over a finite nonzero one is their quotient.Two-sided at a finite point it answers only where
IsRealOnBothSidesholds, the conventionx^xat 0 is held to. Without that,sinh(-1) (x^x - 1)came to 0 two-sided; it staysNaN, and a test pins it.One thing to look at: two two-sided rows move from
NaNto 0 although one side is not real.ln((-x)^tan(x))andlog(1/(1+pi), (-x)^tan(x))at 0. Each one-sided limit is now answered, correctly for the complex values ((-x)^tan(x)tends to 1 from both sides), and the two-sided comparison returns their agreement. The guard above cannot see it, because the side reaches this rule as a question at+ooafter substitution. Master does the same for2 (x^x - 1), which is 0 two-sided. Held for that decision.(cot(x) - 1/x) / ln(x), 0⁺ and 0⁻0(1/sin(x) - 1/x) / ln(x), 0⁺0ln(x) / (cot(x) - 1/x + 2), 0⁺-oo(cot(x) - 1/x + 3) / (x + 2), 03/2tan(x)^2 / (x^x - 1), 0⁻0arctan(x) / x^x + abs(cos(x)), 0⁻NaN1log(1/(1+pi), (-x)^tan(x)), 0⁺0ln((-x)^tan(x)), 0NaNNaN0sinh(-1) (x^x - 1), 0NaNNaNNaNAll rows are in
BREAKING-CHANGES.md; the regression test isADeterminateQuotientIsAnsweredTest.Measured: the unit tests (19279), the wrappers, AOT and the eight harnesses pass. limitcheck over 42 seeds against master: no answer lost or changed; sixteen rows that were unevaluated or
NaNare answered, every one checked against the values approaching the point.🤖 Generated with Claude Code