Repository navigation
Leave a two-sided limit undecided where a side stops at a finite form beside real values - #2426
Merged
Rafael-SOWNet merged 1 commit intoNov 13, 2026
Conversation
… beside real values A two-sided limit asks each side outright when the descent's sides come back NaN. A side that stops at an indeterminate form with an infinity in it counts as undecided (#2419); one of finite parts, 0 / 0 or c / 0, counted as a side without a limit, which made the two-sided limit NaN. That is right for (x - x) / (x - x), which has no value anywhere, and wrong for erf(abs(x)) / x^4 at 0, which is +oo from each side: the form there is two parts whose rates were never compared. Such a side now counts as undecided where the expression has a finite real value at 10^-6 and 10^-9 from the point on that side. Where it has none -- (x - x) / (x - x), or ln(-2) / ln(x) at 1, complex beside the point -- the side still has no limit and the two-sided limit stays NaN. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2426 +/- ##
==========================================
- Coverage 86.82% 86.80% -0.03%
==========================================
Files 312 312
Lines 69545 69551 +6
Branches 20312 20316 +4
==========================================
- Hits 60380 60371 -9
- Misses 4929 4944 +15
Partials 4236 4236
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/a-finite-indeterminate-side-near-real-values-is-undecided
branch
November 13, 2026 15:45
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.
When the descent's sides come back NaN, a two-sided limit asks each side outright. Since #2419, a side that stops at an indeterminate form with an infinity in it is undecided. A side that stops at a form of finite parts only,
0 / 0orc / 0, still counted as a side with no limit, which made the two-sided limit NaN.That is right for
(x - x) / (x - x), which has no value anywhere. It is wrong forerf(abs(x)) / x^4at 0: that limit is +oo from each side, and the form only shows that two rates were never compared.Such a side now counts as undecided where the expression has a finite real value at 10^-6 and 10^-9 from the point on that side. Where it has no real value there, the side still has no limit. That covers
(x - x) / (x - x), andln(-2) / ln(x)at 1, which is complex beside the point.erf(abs(x)) / x^4NaNerf(abs(x)) / (x^3 * sinh(x))NaN1 / log(x^2, cos(x))-ooNaNabs(x)^erf(x)NaNtan(1/2 + x) + abs(x)^erf(x)NaN1 / (x * arccot(x))NaNNaN(x - x) / (x - x)NaNNaNNaN(x - x) * sin(x) / ((x - x) * x)NaNNaNNaNln(-2) / ln(x), at 1NaNNaNNaNsin(1/x),floor(2/x),floor(x),1/x,abs(x)/xNaNNaNNaNAgainst 2.6.0, the
1 / log(x^2, cos(x))and1 / (x * arccot(x))rows change, and both are in BREAKING-CHANGES.md. The other wrong NaNs appeared during this cycle and never shipped. The test pins all of them as unevaluated, and the cases with no limit as NaN.The check runs only on the path where a side has already stopped at an indeterminate form, so no limit that was already answered pays for it.
Checked on this branch:
1 / (x * arccot(x))test row and its BREAKING-CHANGES.md row were added after that run; the test passes.NaNto unevaluated, and no row gained a value. Each is an expression that is real beside the point through a complex intermediate.abs(arctan(x^x))at 0 is pi/4 from each side, andabs(sinh(2)^log(x, -1))at 1 is 1 from each side, so their NaN was wrong.cos(sinh(log(x, -1)))at 1 oscillates, so it had no limit and NaN was right; unevaluated is not wrong.x^xat 0 itself is not real to the left and staysNaN, asLimitTest.TestNoLimitpins it.🤖 Generated with Claude Code