Repository navigation
Find a shared denominator factor however its sums are spelled - #2392
Merged
Merged
Conversation
Two fractions go over their least common denominator where their denominators share a factor, and a factor is shared when it is written alike. Only a -1 added at the top of a factor was written as a 1 subtracted, and the order of a sum's terms was as written. So x + 1/(e^(2x) + -1) and x + 1/(e^(2x) - 1), or (1 + e^(2x))^6 and (e^(2x) + 1)^2, were cross-multiplied, and each sum after it raised the power again. Simplifying the derivatives' quotient of ln(tanh(x) + x^2) / ln(x) took seventeen of that limit's eighteen seconds. A -1 added anywhere in a factor is now written as subtracted, and the factor's operands are put in canonical order. The limit takes 3.5 s. 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 #2392 +/- ##
=======================================
Coverage 86.80% 86.81%
=======================================
Files 312 312
Lines 69225 69223 -2
Branches 20186 20186
=======================================
Hits 60094 60094
+ Misses 4915 4914 -1
+ Partials 4216 4215 -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.
Adding two fractions inside
Simplifygoes over their least common denominator, and a factor counts as shared by both denominators only when the two copies are written alike. Two spellings of one factor were read as different factors:-1added deep inside the factor, as inx + 1/(e^(2x) + -1)againstx + 1/(e^(2x) - 1);(1 + e^(2x))^6against(e^(2x) + 1)^2.Either way the denominators were multiplied together, and each sum after it raised the power again. l'Hôpital's rule on
ln(tanh(x) + x^2) / ln(x)at +oo produces both, and simplifying that one quotient took 17 of the limit's 19 seconds. With a symbol in place ofe^(2x)it took 54 ms.A factor is now compared after
-1anywhere in it is written as a subtraction and its terms are put in the canonical order.ln(tanh(x) + x^2) / ln(x)at +ooNo answer changes. Most of what remains is a second l'Hôpital step whose quotient really does grow. The two new rows in
ASumOfFractionsTakesTheLeastCommonDenominatorTestfail on master and pass here. The test does not time the limit, since a wall clock in a test measures the runner.Measured
DEPTH=3, across 42 seeds against master: no row differs.Found while tracing a slow limitcheck row; no issue was filed.
🤖 Generated with Claude Code