Skip to content

Read an indeterminate power under a function through its exponent - #2381

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
feature/a-power-under-a-function-reads-its-exponent
Nov 7, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
feature/a-power-under-a-function-reads-its-exponent

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

x^x at 0 from the right is 1, but sin(x^x) there came back unevaluated (2.6.0 answered NaN). The rule that reads 0^0, 1^oo and oo^0 through the exponent was only asked of a whole expression. A power inside a function was substituted instead: 0^0 became NaN, and the function above had nothing to work with.

A power in the descent now asks that rule itself, under these conditions:

  • One-sided, or at an infinity, as the top level asks it.
  • Only where the base is positive on the side approached, so the power is real there.
  • Not in the two descents a two-sided limit compares. Read that way, (-x)^x at 0 two-sided would answer 1 while its mirror x^x stays NaN. Which branch each side takes is Read a limit's value at a continuous point before simplifying #2365's open question, and this PR does not answer it. Both stay NaN.
  • Not for the whole question. The one-sided path already asks the rule of the whole expression once the descent has nothing to say. Asking it inside the descent too made two slow limits about 60% slower.
Input 2.6.0 master This PR
sin(x^x), 0 from the right NaN unevaluated sin(1)
cos(x^x), 0 from the right NaN unevaluated cos(1)
sin((x - 1)^ln(x)), 1 from the right NaN unevaluated sin(1)
sin(x^(1/x)), +oo unevaluated unevaluated sin(1)
sqrt(x)/x^pi + x^x, 0 from the right NaN unevaluated +oo

AnInfinityIsNotACoefficientTest recorded the last row as not yet answered, so that test now asserts +oo.

Unchanged: x^x, (-x)^x and sin(x^x) at 0 two-sided stay NaN, and sin(x^x) from the left stays unevaluated.

Measured

  • Suite, wrappers, AOT and the harnesses are green.
  • limitcheck at DEPTH=3, across 42 seeds against master: 139 more limits are answered, each agreeing with the values, and no answer disagrees.
  • One two-sided NaN became a value: 1/abs(x)^x at 0 is 1. Its base is real on both sides, so this is not Read a limit's value at a continuous point before simplifying #2365's question.
  • Three rows did not finish in 5 s on this run and did on master's: x^(abs(x)^arctan(2)) at 0 from each side, and one quotient at -1. Timed alone, each takes about 5 s on both builds.

Found by limitcheck; no issue was filed.

🤖 Generated with Claude Code

x^x at 0+ is 1, and sin(x^x) there was unevaluated. The rule that reads
0^0 and oo^0 through the exponent, e^(g ln f), was asked only of a whole
expression at the top level; the descent substituted the parts' limits,
met 0^0, evaluated it to NaN, and the function above it had nothing.

The power's descent now asks the same rule of the power, one-sided or at
an infinity as the top level asks it, and only where the base is
positive on the side approached, so the power is real there. x^x on the
left of 0 is complex, and the two-sided limits there stay as they were.
Where the rule settles nothing, the pair is substituted as before.

sqrt(x) / x^pi + x^x at 0+ is answered +oo by it, which its test said
was not answered yet; the row moves to an assertion of the value.

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 96.42857% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.78%. Comparing base (42d1fe9) to head (607d64f).

Files with missing lines Patch % Lines
...nctions/Continuous/Limits/Solvers/Limit.Classes.cs 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2381      +/-   ##
==========================================
+ Coverage   86.75%   86.78%   +0.02%     
==========================================
  Files         312      312              
  Lines       69072    69095      +23     
  Branches    20149    20151       +2     
==========================================
+ Hits        59925    59961      +36     
+ Misses       4931     4918      -13     
  Partials     4216     4216              
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.32% <96.42%> (+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 90.29% <100.00%> (+0.60%) ⬆️
...ath/Functions/Continuous/Limits/Transformations.cs 88.40% <ø> (ø)
...nctions/Continuous/Limits/Solvers/Limit.Classes.cs 73.91% <88.88%> (+0.35%) ⬆️

... and 6 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 50e9403 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-power-under-a-function-reads-its-exponent branch November 7, 2026 12:24
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