Repository navigation
Ask the first remarkable limit's parts from the side of the limit - #2403
Merged
Merged
Conversation
The first remarkable limit asks whether a quotient's dividend and divisor both vanish at the point, and whether a sine's argument does, before reading the sine as its argument. It asked from both sides, also inside a one-sided limit, and asked the dividend first. sinh((x - 1)^ln(x)) at 1 from the right is (e^((x - 1)^ln(x)) - e^(-(x - 1)^ln(x))) / 2, and its dividend was taken through the left side as well, where (x - 1)^ln(x) is not real: 5 s, then 3 s more on its respelling, before the divisor 2 said no. Each part is now asked from the side of the limit, and the simpler part first, since one that does not vanish settles the question. The equivalence of a sine and its argument holds on one side of the point as much as on both, so the rule needs its parts to vanish on the side approached only. sinh((x - 1)^ln(x)) at 1 takes 2.1 s from the right, from 9.0 s; 6.8 s from the left, from 14.4 s; and 4.7 s two-sided, from 11.5 s, with the same answers. Asking the divisor first instead would have cost (-1 - x) / (ln(2) / ln(x))^(x - 1) at 1 from the left 2.2 s, its divisor being the expensive part and asked again by the descent. 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 #2403 +/- ##
==========================================
- Coverage 86.81% 86.80% -0.01%
==========================================
Files 312 312
Lines 69337 69339 +2
Branches 20234 20235 +1
==========================================
- Hits 60193 60191 -2
- Misses 4918 4919 +1
- Partials 4226 4229 +3
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.
Before reading a sine as its argument, the first remarkable limit asks whether a quotient's two parts both vanish. Two things changed in how it asks:
The fix is in
Transformations.cs, plus one argument passed inSolvers.Definition.cs.sinh((x - 1)^ln(x))at 1 is rewritten as(e^u - e^(-u)) / 2. Its dividend was taken through the left of 1, where(x - 1)^ln(x)is not real, before the divisor2said no.sinh((x - 1)^ln(x)), rightsinh((x - 1)^ln(x)), leftsinh((x - 1)^ln(x)), two-sidedcosh((x - 1)^ln(x)), right(-1 - x) / (ln(2) / ln(x))^(x - 1), leftThe last row is why the simpler part goes first. Asking the divisor first instead took it to 8.3 s, because there the divisor is the expensive part.
No answer changes. The calculus tests pass, and so do the full suite (19224), the AOT build and every harness. limitcheck against master moves only rows that used to hit its 5 s limit:
sinh((x - 1)^ln(x))at 1 now finishes on all three sides.tanh(log(x, -1) - tan(x))at 1, from either side, finishes in time and still declines, as on master.New test:
ARemarkableLimitIsAskedFromItsSideTest.🤖 Generated with Claude Code