Skip to content

Count the powers of a logarithm in l'Hôpital's quotient at a point - #2407

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
feature/limit-of-a-log-over-a-vanishing-quotient
Nov 10, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
feature/limit-of-a-log-over-a-vanishing-quotient

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

At a finite point, l'Hôpital's rule reads the quotient it gets factor by factor, by order (#2406). A logarithm stopped that reading, because a log has no power order.

(x - sin(x)) * ln(x) / x^3 at 0 from the right steps to ((1 - cos(x)) * ln(x) + (x - sin(x)) / x) / (3x^2). To leading order that is ln(x) / 6, which tends to −oo, but the limit was left unevaluated.

From the right, the reading now counts the powers of ln of the distance to the point alongside the powers of the distance:

  • a term whose distance power is 0 and whose log power is above 0 is a pole; with a log power below 0 it vanishes;
  • of two terms of the same order, the one with more log powers leads;
  • the logarithm of c * d^k, with c > 0 and k ≠ 0, is k * ln(d) to leading order.
limit at 0, from the right 2.6.0 master this PR
(x - sin(x)) * ln(x) / x^3 unevaluated unevaluated, 1.6 s −oo, 0.24 s
(e^x - 1 - x) * ln(cos(x) * sqrt(x)) / x^2 unevaluated unevaluated, 2.7 s −oo, 0.43 s
(e^x - 1 - x) * ln(x^2 * cos(x)) / x^2 unevaluated unevaluated, 3.9 s −oo, 0.43 s
(x - sin(x)) * ln(x) / x^2 0 0, 2.7 s 0, 0.24 s
cos(tanh(x))^log(x + 1, tanh(x)) unevaluated unevaluated, 4.1 s 1, 1.1 s
ln(x)^erf(x) - log(sqrt(1/2), 4) unevaluated unevaluated 5

The last two rows come from limitcheck, which compares this branch against master over all of its seeds. It finds no new disagreements and only these two newly answered rows. No answer changes against 2.6.0, so there is no breaking-changes entry.

Every test suite, the AOT build and all ten harnesses pass. The new test is ALogarithmIsReadByItsOrderTest.

🤖 Generated with Claude Code

At a finite point the rule reads the quotient it gets by each factor's
order, and a logarithm stopped the reading. (x - sin(x)) * ln(x) / x^3 at
0 from the right steps to ((1 - cos(x)) * ln(x) + (x - sin(x)) / x) / (3x^2),
which is ln(x) / 6 to leading order and tends to -oo, and was left
unevaluated. From the right, the powers of ln of the distance to the
point are now counted beside the powers of the distance: alone above
they are a pole, below they vanish, and of two terms of one order the
one with more of them leads. A logarithm of c * d^k, c > 0 and k not 0,
is k * ln(d) to leading order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.18919% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.81%. Comparing base (605f530) to head (6bd3e27).

Files with missing lines Patch % Lines
...ath/Functions/Continuous/Limits/Transformations.cs 89.18% 1 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2407      +/-   ##
==========================================
+ Coverage   86.80%   86.81%   +0.01%     
==========================================
  Files         312      312              
  Lines       69387    69407      +20     
  Branches    20254    20261       +7     
==========================================
+ Hits        60231    60256      +25     
+ Misses       4928     4924       -4     
+ Partials     4228     4227       -1     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.35% <89.18%> (+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 Δ
...ath/Functions/Continuous/Limits/Transformations.cs 88.23% <89.18%> (+0.38%) ⬆️

... and 5 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 3e85c2a into master Nov 10, 2026
34 of 35 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Nov 10, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the feature/limit-of-a-log-over-a-vanishing-quotient branch November 10, 2026 14:28
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