Skip to content

Ask a quotient of logarithms' derivatives as one quotient - #2354

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-quotient-of-logarithms-as-one-quotient
Nov 3, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-quotient-of-logarithms-as-one-quotient

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

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 1 2.6.0 master now
from the left 1, 14 ms 1, 11.9 s 1, 191 ms
from the right 1, 5.5 s 1, 6.1 s 1, 40 ms
two-sided 1, 15.7 s 1, 59 ms

Bisected to #2275, which made LogarithmDiverges read a finite limit by its value. That was right: both logarithms here diverge, so SolveAsLogarithmDivision applies, 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, while x ln(x) / (x - 1), the same function, takes 26 ms. The ratio is now asked as the single quotient u' 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

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>
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Nov 3, 2026
@Rafael-SOWNet Rafael-SOWNet moved this from Todo to In review in AngouriMath Nov 3, 2026
@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.76%. Comparing base (5a665c6) to head (e170ed6).

Additional details and impacted files

Impacted file tree graph

@@           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     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.31% <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 Δ
...nctions/Continuous/Limits/Solvers/Limit.Solvers.cs 86.57% <100.00%> (-0.09%) ⬇️

... and 9 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 0116c08 into master Nov 3, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Nov 3, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the a-quotient-of-logarithms-as-one-quotient branch November 3, 2026 18:42
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