Skip to content

Put a step function at its one-sided limit before a one-sided limit is taken - #2332

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
a-step-function-with-a-one-sided-limit-is-that-limit-near-it
Nov 2, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
a-step-function-with-a-one-sided-limit-is-that-limit-near-it

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Found by limitcheck at seed 11. No issue was filed.

floor, ceil, round and sgn take only whole values, so one that has a limit from a side equals that limit on a whole interval on that side. Each is now put in as its one-sided limit, wherever that limit is a whole number, before a one-sided limit is taken. In the two-sided path each side gets its own.

floor(x) is 0 on (0, 1), so there floor(x)^x is 0 to a positive power. It was read as the form 0^0 through e^(x ln(floor(x))), and answered 1.

2.6.0 master this PR
floor(x)^x at 0+ 1 1 0
floor(x)^tanh(x) at 0+ unevaluated 1 0
floor(x)^x at 0 unevaluated 1 NaN: 1 from the left, 0 from the right

The last two were wrong only on master, not in 2.6.0.

limitcheck ran 600 expressions at each of seeds 1, 7 and 11:

  • at seeds 1 and 7 the findings are master's;
  • at seed 11, the floor(x)^tanh(x) row is gone;
  • 11 more limits are answered across seeds 1 and 7, and each agrees with the values.

Tests: four of the seven in AStepFunctionNearItsLimitTest fail on master; the other three are controls. There is a BREAKING entry, A step function that has a limit from one side is that limit on that side.

🤖 Generated with Claude Code

…s taken

floor, ceil, round and sgn take only whole values, so one that has a limit
from a side equals that limit on an interval on that side. Each is now put
in as its one-sided limit wherever that limit is a whole number, before a
one-sided limit is taken, and in the two-sided path each side gets its own.

floor(x) is 0 on (0, 1), so floor(x)^x there is 0 to a positive power. It
was read as the form 0^0 through e^(x ln(floor(x))), and answered 1:

| | 2.6.0 | master | now |
|---|---|---|---|
| floor(x)^x at 0+ | 1 | 1 | 0 |
| floor(x)^tanh(x) at 0+ | unevaluated | 1 | 0 |
| floor(x)^x at 0 | unevaluated | 1 | NaN, 1 from the left and 0 from the right |

limitcheck, 600 expressions at each of seeds 1, 7 and 11: the findings are
master's at 1 and 7, and at 11 the floor(x)^tanh(x) row is gone. 11 more
limits are answered across seeds 1 and 7, each agreeing with the values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Rafael-SOWNet Rafael-SOWNet added this to the 2.7.0 milestone Nov 2, 2026
@Rafael-SOWNet Rafael-SOWNet moved this from Todo to In review in AngouriMath Nov 2, 2026
@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.74%. Comparing base (93a52f0) to head (4c2a22c).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2332      +/-   ##
==========================================
- Coverage   86.75%   86.74%   -0.01%     
==========================================
  Files         312      312              
  Lines       68447    68457      +10     
  Branches    19909    19911       +2     
==========================================
+ Hits        59379    59384       +5     
- Misses       4908     4915       +7     
+ Partials     4160     4158       -2     
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.29% <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 89.02% <100.00%> (+0.71%) ⬆️

... and 9 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 7907c4c into master Nov 2, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Nov 2, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the a-step-function-with-a-one-sided-limit-is-that-limit-near-it branch November 2, 2026 16:10
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