Repository navigation
Read a limit that is a constant minus itself as 0 (#2628) - #2632
Merged
Rafael-SOWNet merged 1 commit intoNov 28, 2026
Merged
Conversation
The limit of (e^(a + x) - e^a) / x at 0 was NaN, the claim that it has no limit, and so were the difference quotients of sqrt, sin, ln and cube roots at a symbolic point. The numerator's limit came back as e^a - e^a, which the inner simplification leaves written; nothing read it as 0, so the quotient was taken for a constant over a vanishing divisor, whose two sides disagree. LimitFunctional.CancelledDifference turns a limit that is one finite constant minus itself into 0, with the constant's domain condition where it has one, as Simplify does for ln(a) - ln(a). It is applied to every limit ComputeLimit returns and to both of Minusf's descent results. The two sides are compared inner-simplified as well: for the difference of logarithms the two terms print alike as ln(a) and are not the same tree. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2632 +/- ##
==========================================
- Coverage 86.72% 86.70% -0.03%
==========================================
Files 345 345
Lines 75366 75445 +79
Branches 22026 22042 +16
==========================================
+ Hits 65360 65413 +53
- Misses 5400 5419 +19
- Partials 4606 4613 +7
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
difference-quotient-at-a-symbolic-point-2628
branch
November 28, 2026 21:15
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.
The limit of a difference quotient at a symbolic point was
NaN, which claims the limit does not exist. Each of these is a textbook derivative.Cause. The numerator's limit came back as
e^a - e^a. The inner simplification leaves that as written, so nothing read it as 0. The quotient was then taken for a nonzero constant over a vanishing divisor, which diverges with opposite signs on the two sides.Fix.
LimitFunctional.CancelledDifferenceturns a limit that is one finite constant minus itself into 0. Where the constant has a domain condition, the 0 carries it, asSimplifyalready does forln(a) - ln(a). It is applied to every limitComputeLimitreturns and to both descent results inMinusf..Limit(x, ...)(e^(a + x) - e^a) / xat 0NaNe ^ a(sin(a + x) - sin(a)) / xat 0NaNcos(a)(ln(a + x) - ln(a)) / xat 0NaN1 / a(sqrt(a + x) - sqrt(a)) / xat 0NaNa ^ (-1/2) / 2((a + x)^(1/3) - a^(1/3)) / xat 0NaNa ^ (-2/3) / 3(sqrt(x) - sqrt(b)) / (x - b)atbNaNb ^ (-1/2) / 2ln(a + x) - ln(a)at 0ln(a) - ln(a)0 provided not a = 0Checks
ADifferenceQuotientAtASymbolicPointTesttakes each limit from both sides and from each side alone. It requires an answer that is notNaN, and compares it by value with the derivative at three values ofa.NaNs that are all thex^xfamily (a policy question).ln. No answer differs from current master..editorconfiggains one entry: the 2026 header template for the new test file, which IDE0073 requires. The breaking-changes entry is under Unreleased.Closes #2628.
🤖 Generated with Claude Code