Skip to content

Read a real power of a vanishing function in a limit by its order - #2397

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
feature/limit-of-a-power-by-its-order
Nov 9, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
feature/limit-of-a-power-by-its-order

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

A real power g^a (a constant a that is not an integer) of anything other than x itself had no reading in a limit. Even (2x)^pi ln(x) at 0 from the right was left unevaluated, and ln(x) / (2x)^(-pi) took 15 s to be.

The fix. Where g^a is a factor of the product or quotient, and g tends to 0 or to +oo, it is read as x^(k a) · (g / x^k)^a. Here k, the limit of x g' / g, is the power of x that g behaves like. The second part tends to a positive number and is taken out of the limit, so what remains is a power of x, which the existing readings answer.

  • Only a factor is rewritten. In a sum, the part taken out would be the whole answer, so sin(x)^pi - x^pi is left to the readings it had.
  • A base tending to −oo is not read. Its real power is complex, and the first version of this change, which asked for its order anyway, turned three quick declines into slow ones (0.3 s → 6.8 s and 17.6 s; 4.1 s → 7.2 s). With the guard they are back to master's times.

Measured on 2.6.0, master (47b6600) and this branch. Each of these is unevaluated on 2.6.0 and on master:

Limit This branch
sin(x)^pi ln(x) at 0+ 0
(2x)^pi ln(x) at 0+ 0
sqrt(sin(x)) ln(x) at 0+ 0
ln(x) / (2x)^(-pi) at 0+ 0, in 0.27 s (master: 15.2 s to decline)
sin(sin(x)^pi ln(x)) at 0+ 0
sin(x)^pi / x^pi at 0+ 1, in 1.4 s (master: 2.2 s to decline)
(x^2 + 1)^(1/pi) / x^(2/pi) at +oo 1
sqrt(arctan(1)) / (1/2 / x)^sinh(pi) at +oo +oo
x / (1/2) / (x + 1)^pi at −1+ −oo

limitcheck, 42 seeds at depth 3 with 600 expressions each, against master: 2 limits answered that master leaves unevaluated (the last two rows above), and no losses, wrong answers or new timeouts.

Checks: the full suite passed (19183 tests), as did the MCP, terminal, interactive and F# wrapper suites, the AOT build and the eight harnesses. A BREAKING-CHANGES entry lists the rows.

New test: APowerIsReadByItsOrderTest. It includes the two negative-base declines, which are asserted to stay unevaluated.

🤖 Generated with Claude Code

A power g^a to an exponent that is not an integer, of a g tending to 0
or +oo, had no reading against a logarithm unless g was x
itself: x^pi ln(x) at 0 from the right was 0, while sin(x)^pi ln(x),
and even (2x)^pi ln(x), were left unevaluated, and ln(x) / (2x)^(-pi)
took fifteen seconds to be.

As a factor of the product or quotient the expression is, g^a is
x^(k a) times (g / x^k)^a, where k, the limit of x g' / g, is the power
of x that g behaves like. The second part tends to a positive number,
which is taken out of the limit, and what is left is a power of x
against the rest. Only a factor is rewritten: in a sum, the part taken
out is the whole of the answer. A base tending to -oo is not read:
its real power is complex, and asking for its order took a decline
that master gives in 0.3 s to 17.6 s. Found by limitcheck; no issue
was filed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Nov 9, 2026
@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.81%. Comparing base (47b6600) to head (3066da5).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2397      +/-   ##
==========================================
- Coverage   86.81%   86.81%   -0.01%     
==========================================
  Files         312      312              
  Lines       69242    69265      +23     
  Branches    20193    20201       +8     
==========================================
+ Hits        60110    60129      +19     
- Misses       4914     4917       +3     
- Partials     4218     4219       +1     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.34% <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 Δ
...ath/Functions/Continuous/Limits/Transformations.cs 88.97% <100.00%> (+0.33%) ⬆️

... 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 567890f into master Nov 9, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Nov 9, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the feature/limit-of-a-power-by-its-order branch November 9, 2026 06:23
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