Repository navigation
Ask a quotient of logarithms' derivatives as one quotient - #2354
Merged
Merged
Conversation
Where both logarithms of a quotient diverge, SolveAsLogarithmDivision takes the limit of the ratio of their logarithmic derivatives, and asked it as a quotient of quotients, (u'/u) / (v'/v). For ln(x - 1) / ln(ln(x)) at 1 that is (1/(x - 1)) / ((1/x) / ln(x)), and its limit took 8.7 s, where x ln(x) / (x - 1), the same function, takes 26 ms. The limit at 1 took 11.9 s from the left, 6 s from the right and 16 s two-sided. The left side took 14 ms before #2275, which rightly sent it to this rule; the right was already 5.5 s in 2.6.0. limitcheck, which gives each limit five seconds, found it on SEED=16. The ratio is asked as u' v / (u v'). The limit at 1 is 1 from each side, as before, in 191 ms, 40 ms and 59 ms. limitcheck on seeds 14 to 16 finds no limit of another value and no new NaN, and the two that did not finish now agree with the values. 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 #2354 +/- ##
=======================================
Coverage 86.75% 86.76%
=======================================
Files 312 312
Lines 68754 68753 -1
Branches 20025 20025
=======================================
+ Hits 59650 59656 +6
+ Misses 4920 4912 -8
- Partials 4184 4185 +1
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.
A performance regression, with no change to any answer. limitcheck found it on
SEED=16, where it gives each limit five seconds. No issue was filed.ln(x - 1) / ln(ln(x))at 11, 14 ms1, 11.9 s1, 191 ms1, 5.5 s1, 6.1 s1, 40 ms1, 15.7 s1, 59 msBisected to #2275, which made
LogarithmDivergesread a finite limit by its value. That was right: both logarithms here diverge, soSolveAsLogarithmDivisionapplies, and the left side now reaches it. The rule takes the limit of the ratio of the logarithmic derivatives, and it asked that as a quotient of quotients,(u'/u) / (v'/v). Here that is(1/(x - 1)) / ((1/x) / ln(x)), whose limit took 8.7 s, whilex ln(x) / (x - 1), the same function, takes 26 ms. The ratio is now asked as the single quotientu' v / (u v'), which is the shape the other limit rules read.limitcheck on seeds 14–16 finds no limit of another value and no new NaN, and the two limits that did not finish now agree with the values. The 706 limit tests pass.
Tests:
AQuotientOfLogarithmsIsAskedAsOneQuotientTest, 5 limits that must be 1, each under a 4 s cap. That is 20 times the fixed time and a third of master's, so it measures the code and not the runner. All 5 fail on master by the cap. The full suite, AOT and the nine harnesses pass. No answer changes, so there is no BREAKING-CHANGES entry.🤖 Generated with Claude Code