Skip to content

Answer a limit of a quotient whose parts tend to a determinate form - #2410

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
feature/limit-of-a-determinate-quotient
Nov 11, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
feature/limit-of-a-determinate-quotient

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

(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/x is +oo - +oo to it and 0 asked whole: 0 over -oo reached 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 IsRealOnBothSides holds, the convention x^x at 0 is held to. Without that, sinh(-1) (x^x - 1) came to 0 two-sided; it stays NaN, and a test pins it.

One thing to look at: two two-sided rows move from NaN to 0 although one side is not real. ln((-x)^tan(x)) and log(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 +oo after substitution. Master does the same for 2 (x^x - 1), which is 0 two-sided. Held for that decision.

2.6.0 master this PR
(cot(x) - 1/x) / ln(x), 0⁺ and 0⁻ unevaluated unevaluated 0
(1/sin(x) - 1/x) / ln(x), 0⁺ unevaluated unevaluated 0
ln(x) / (cot(x) - 1/x + 2), 0⁺ unevaluated unevaluated -oo
(cot(x) - 1/x + 3) / (x + 2), 0 unevaluated unevaluated 3/2
tan(x)^2 / (x^x - 1), 0⁻ unevaluated unevaluated 0
arctan(x) / x^x + abs(cos(x)), 0⁻ NaN unevaluated 1
log(1/(1+pi), (-x)^tan(x)), 0⁺ 30 s timeout unevaluated 0
ln((-x)^tan(x)), 0 NaN NaN 0
sinh(-1) (x^x - 1), 0 NaN NaN NaN

All rows are in BREAKING-CHANGES.md; the regression test is ADeterminateQuotientIsAnsweredTest.

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 NaN are answered, every one checked against the values approaching the point.

🤖 Generated with Claude Code

Rafael-SOWNet and others added 2 commits November 10, 2026 21:05
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

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.82%. Comparing base (e994ffd) to head (27b605b).

Files with missing lines Patch % Lines
...ath/Functions/Continuous/Limits/Transformations.cs 92.85% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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              
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.36% <92.85%> (-0.01%) ⬇️
fsharp 32.97% <ø> (ø)
interactive 39.81% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ath/Functions/Continuous/Limits/Transformations.cs 88.55% <92.85%> (-0.17%) ⬇️

... and 5 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 9f82bd6 into master Nov 11, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Nov 11, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the feature/limit-of-a-determinate-quotient branch November 11, 2026 13:12
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