Skip to content

Give a vanishing base to a negative whole power its infinity - #2380

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
feature/a-vanishing-base-to-a-negative-whole-power
Nov 7, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
feature/a-vanishing-base-to-a-negative-whole-power

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

sin(x)^(-2) at 0 was left unevaluated from each side and was NaN two-sided, where the limit is +oo and 1/sin(x)^2 already answered +oo. The power's rule for a vanishing base took only one that is never negative by its form, as abs(x) or x^2 is.

A base tending to 0 that is real near the point and keeps a sign there is not 0 near it, so to a negative whole power it is 1 over a power tending to 0 from that sign's side:

  • An even power tends to +oo.
  • An odd power tends to +oo or -oo by the base's sign. A two-sided limit is answered only where the two sides agree, so sin(x)^(-1) stays NaN.
  • The exponent has to be that whole number near the point, not only tend to it, so sin(x)^(x - 2) is left alone. x - 1 - (x + 1) is -2 only once Simplify has cancelled x, and Simplify is asked only once the exponent's limit is already a negative whole number.
  • The base has to be real there. x^x - 1 on the left of 0 is complex and is not read.
Input, at 0 2.6.0 master This PR
sin(x)^(-2), two-sided NaN NaN +oo
sin(x)^(-2), from the right NaN unevaluated +oo
(arcsin(x)^(-2))^2, two-sided NaN NaN +oo
tan(x/2)^((x - 1) - (x + 1)), two-sided NaN NaN +oo
sin(x)^(-1), from the left NaN unevaluated -oo

Measured

  • Suite, wrappers, AOT and the harnesses are green.
  • limitcheck at DEPTH=3, across 41 seeds against master: five more limits answered at SEED=19, 77 and 80, each agreeing with the values.
  • One row moved the other way. (tan(x)^(-1))^(-x) at 0, two-sided, was NaN and is now unevaluated. Its inner tan(x)^(-1) is now -oo from the left and +oo from the right, where master left both unevaluated. The outer power then meets an infinity to the power 0 on each side, an indeterminate form, and declines, so it no longer reaches the route that answered NaN. The left side takes the complex branch, which makes this a case of Read a limit's value at a continuous point before simplifying #2365's open question. Unevaluated claims nothing either way.

Found by limitcheck at SEED=80; no issue was filed.

🤖 Generated with Claude Code

sin(x)^(-2) at 0 was left unevaluated from each side and was NaN
two-sided, where 1/sin(x)^2 was +oo. The power's own rule for a
vanishing base took only one that is never negative by its form.

A base tending to 0 that is real near the point and keeps a sign there
is not 0 near it, so to a negative whole power it is 1 over a power
tending to 0 from that sign's side: +oo for an even power, +oo or -oo by
the sign for an odd one, and two-sided only where both sides agree. The
exponent has to be that whole number near the point, not only tend to
it, so it is read through Simplify, which is asked only once its limit
already is one.

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

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.89474% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.76%. Comparing base (c41c8c5) to head (fcf8565).

Files with missing lines Patch % Lines
...nctions/Continuous/Limits/Solvers/Limit.Classes.cs 57.89% 3 Missing and 5 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2380      +/-   ##
==========================================
- Coverage   86.78%   86.76%   -0.02%     
==========================================
  Files         312      312              
  Lines       69053    69072      +19     
  Branches    20141    20149       +8     
==========================================
+ Hits        59925    59929       +4     
- Misses       4917     4928      +11     
- Partials     4211     4215       +4     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.30% <57.89%> (-0.02%) ⬇️
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 89.68% <ø> (ø)
...nctions/Continuous/Limits/Solvers/Limit.Classes.cs 73.56% <57.89%> (-0.82%) ⬇️

... and 2 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 42d1fe9 into master Nov 7, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Nov 7, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the feature/a-vanishing-base-to-a-negative-whole-power branch November 7, 2026 08:22
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