Skip to content

Ask the first remarkable limit's parts from the side of the limit - #2403

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

Rafael-SOWNet merged 1 commit into
masterfrom
feature/limit-of-a-function-of-a-power

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Before reading a sine as its argument, the first remarkable limit asks whether a quotient's two parts both vanish. Two things changed in how it asks:

  • Side: it asked from both sides, even inside a one-sided limit. Each part is now asked from the limit's own side, since the equivalence holds on one side as well as on both.
  • Order: it asked the dividend first. The simpler part is now asked first, because a part that does not vanish settles the question.

The fix is in Transformations.cs, plus one argument passed in Solvers.Definition.cs.

sinh((x - 1)^ln(x)) at 1 is rewritten as (e^u - e^(-u)) / 2. Its dividend was taken through the left of 1, where (x - 1)^ln(x) is not real, before the divisor 2 said no.

limit at 1 master this PR
sinh((x - 1)^ln(x)), right 9.0 s 2.0 s
sinh((x - 1)^ln(x)), left 14.4 s 6.7 s
sinh((x - 1)^ln(x)), two-sided 11.4 s 4.9 s
cosh((x - 1)^ln(x)), right 9.1 s 2.0 s
(-1 - x) / (ln(2) / ln(x))^(x - 1), left 6.0 s 5.8 s

The last row is why the simpler part goes first. Asking the divisor first instead took it to 8.3 s, because there the divisor is the expensive part.

No answer changes. The calculus tests pass, and so do the full suite (19224), the AOT build and every harness. limitcheck against master moves only rows that used to hit its 5 s limit:

  • sinh((x - 1)^ln(x)) at 1 now finishes on all three sides.
  • tanh(log(x, -1) - tan(x)) at 1, from either side, finishes in time and still declines, as on master.

New test: ARemarkableLimitIsAskedFromItsSideTest.

🤖 Generated with Claude Code

The first remarkable limit asks whether a quotient's dividend and divisor both
vanish at the point, and whether a sine's argument does, before reading the
sine as its argument. It asked from both sides, also inside a one-sided limit,
and asked the dividend first. sinh((x - 1)^ln(x)) at 1 from the right is
(e^((x - 1)^ln(x)) - e^(-(x - 1)^ln(x))) / 2, and its dividend was taken
through the left side as well, where (x - 1)^ln(x) is not real: 5 s, then
3 s more on its respelling, before the divisor 2 said no.

Each part is now asked from the side of the limit, and the simpler part
first, since one that does not vanish settles the question. The equivalence
of a sine and its argument holds on one side of the point as much as on both,
so the rule needs its parts to vanish on the side approached only.
sinh((x - 1)^ln(x)) at 1 takes 2.1 s from the right, from 9.0 s; 6.8 s from
the left, from 14.4 s; and 4.7 s two-sided, from 11.5 s, with the same
answers. Asking the divisor first instead would have cost
(-1 - x) / (ln(2) / ln(x))^(x - 1) at 1 from the left 2.2 s, its divisor
being the expensive part and asked again by the descent.

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.80%. Comparing base (cc5e13b) to head (5220812).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2403      +/-   ##
==========================================
- Coverage   86.81%   86.80%   -0.01%     
==========================================
  Files         312      312              
  Lines       69337    69339       +2     
  Branches    20234    20235       +1     
==========================================
- Hits        60193    60191       -2     
- Misses       4918     4919       +1     
- Partials     4226     4229       +3     
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 Δ
...ns/Continuous/Limits/Solvers/Solvers.Definition.cs 91.88% <100.00%> (-0.37%) ⬇️
...ath/Functions/Continuous/Limits/Transformations.cs 88.11% <100.00%> (+0.02%) ⬆️

... and 7 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 e8b0995 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-function-of-a-power branch November 9, 2026 23:37
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