Skip to content

Find a shared denominator factor however its sums are spelled - #2392

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
feature/limit-of-a-log-quotient-at-infinity
Nov 8, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
feature/limit-of-a-log-quotient-at-infinity

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Adding two fractions inside Simplify goes 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:

  • -1 added deep inside the factor, as in x + 1/(e^(2x) + -1) against x + 1/(e^(2x) - 1);
  • the terms of a sum in another order, as in (1 + e^(2x))^6 against (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 of e^(2x) it took 54 ms.

A factor is now compared after -1 anywhere in it is written as a subtraction and its terms are put in the canonical order.

ln(tanh(x) + x^2) / ln(x) at +oo master This PR
answer 2 2
time 19.8 s 3.3 s

No answer changes. Most of what remains is a second l'Hôpital step whose quotient really does grow. The two new rows in ASumOfFractionsTakesTheLeastCommonDenominatorTest fail on master and pass here. The test does not time the limit, since a wall clock in a test measures the runner.

Measured

  • Suite, wrappers, AOT and the harnesses are green; canoncheck and confluence match their baselines.
  • limitcheck at 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

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>
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Nov 8, 2026
@codecov

codecov Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.81%. Comparing base (3c2951c) to head (9aeb264).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           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     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.35% <100.00%> (+<0.01%) ⬆️
fsharp 32.97% <ø> (ø)
interactive 40.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
Sources/AngouriMath/Functions/SingleQuotient.cs 92.78% <100.00%> (-0.15%) ⬇️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Rafael-SOWNet
Rafael-SOWNet merged commit 5f620b1 into master Nov 8, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Nov 8, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the feature/limit-of-a-log-quotient-at-infinity branch November 8, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant