Repository navigation
Fold the destination out of a trigonometric argument's limit - #2361
Merged
Rafael-SOWNet merged 1 commit intoNov 4, 2026
Merged
Conversation
A one-sided limit at a finite point moves the variable out to infinity, and the value read off there keeps the infinity in it: x^2 + x - 1 from the left at 0 came back as -1 - 1/+oo + 1/+oo^2. That is -1, but the sine above it asked whether it was finite, was told no, and declined -- so sin(x^2 + x - 1) from the left at 0 was left unevaluated, as on 2.6.0, and with it the two-sided limit and the tangent's. The argument's limit is now folded for the six trigonometric functions, which have no cut and are continuous at every finite argument short of a pole. Folding it in the substitution itself, for every caller, answered arctan on its cut and x! at its pole -1, which the descent declined only because the infinity was still there: limitcheck read arctan(ln(x))^2 at -1+ as arctan(ln(-1))^2, the value on the cut, and three tests failed. limitcheck, DEPTH=3, seeds 14, 16, 19, 23, 26 against master f73ac9a: three limits more answered, the wrong values and the NaNs unchanged. Found at SEED=26; no issue was filed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2361 +/- ##
==========================================
- Coverage 86.78% 86.78% -0.01%
==========================================
Files 312 312
Lines 68815 68818 +3
Branches 20048 20050 +2
==========================================
+ Hits 59724 59726 +2
- Misses 4908 4909 +1
Partials 4183 4183
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
fix/fold-the-infinities-a-substitution-leaves
branch
November 4, 2026 05:35
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.
sin(x^2 + x - 1)from the left at 0 was left unevaluated, as on 2.6.0, and so were its two-sided limit and the tangent's.A one-sided limit at a finite point moves the variable out to infinity, and the value read off there keeps the infinity in it:
x^2 + x - 1from the left at 0 comes back as-1 - 1/+oo + 1/+oo^2. That is -1, but the sine above it asks whether it is finite, is told no, and declines.The argument's limit is now folded for the six trigonometric functions. They have no cut, and are continuous at every finite argument short of a pole.
Not folded for every caller, deliberately. The first version folded in
SolveBySubstitutionitself. That answeredarctanon its cut andx!at its pole -1, which the descent had declined only because the infinity was still there. limitcheck then readarctan(ln(x))^2at -1+ asarctan(ln(-1))^2, the value on the cut, and three tests failed.limitcheck, DEPTH=3, seeds 14, 16, 19, 23 and 26, against master f73ac9a:
The three newly answered limits are
cos(sinh(x) + x + 1)at -1, from the right and from both sides, andtan(x^2 + x - 1)at 0 from both sides. This also turns the two rows of #2360's test that it allowed to decline into required answers. Suite, AOT and the harnesses are green locally.Found by limitcheck at
SEED=26; no issue was filed.🤖 Generated with Claude Code