Skip to content

Read a difference with 0 as what it subtracts 0 from, for a sign near a point - #2388

Merged
Rafael-SOWNet merged 2 commits into
masterfrom
feature/step-of-a-power
Nov 8, 2026
Merged

Rafael-SOWNet merged 2 commits into
masterfrom
feature/step-of-a-power

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

A step function arriving at 0 asks the sign of its argument, and now gets it. At a jump, floor and ceil ask which side their argument arrives from, as the sign of the argument less the jump. When the jump is 0, that difference is g - 0, and the sign reader did not read it as g. floor(x^(3/2)) at 0 from the right was left unevaluated, although the factor reader knows that a positive base to a real power is positive. The second derivative of x^(3/2) diverges at 0, and its slope sqrt(x) tends to 0, so nothing else gave a sign either. At an infinity, floor(1/x) was left unevaluated the same way. A difference with 0 is now read as what it subtracts 0 from. The comparisons in HoldsNear ask their sign the same way and get the same reading.

Limit master branch
floor(x^(3/2)), floor(x^pi), floor(x^2 sqrt(x)) at 0+ unevaluated 0
ceil(-x sqrt(x)) at 0+ unevaluated 0
floor(sinh(2)^log(2, x)) at 0+ unevaluated, 7.3 s 0, 4.5 s
floor(1/x) at +oo, at -oo unevaluated 0, -1
floor(log(x - 1, x)) at 1+ unevaluated -1

From the left of 0, x^(3/2) is not real, and floor(x^(3/2)) is still left unevaluated there.

limitcheck A/B against master (DEPTH=3, the usual seeds): 70 answers gained, none lost, and the harness agrees with each. 62 are at an infinity, mostly floor(c/x) and floor(e^x) inside something else. I checked eleven by hand, for example floor(x/log(x, x)) at 0-, which is -1 because log(x, x) is 1. floor(sqrt(x^3)) at 0+ is now answered too, but it still takes over 5 s, as on master. That search is not this fix.

Each changed answer is in BREAKING-CHANGES.md, measured on 2.6.0, which leaves all of them unevaluated. The full suite (19,124), the wrapper suites, AOT and the ten harnesses pass.

Found by limitcheck at DEPTH=3, SEED=43, from the slow floor(sqrt(x^3)). No issue was filed.

🤖 Generated with Claude Code

Rafael-SOWNet and others added 2 commits November 8, 2026 06:53
… a point

A step function at a jump of 0 asks the sign its argument less 0 keeps on the
side approached, and so does a comparison with 0. SignNear did not read g - 0
as g: floor(x^(3/2)) at 0 from the right was declined, because the second
derivative of x^(3/2) diverges at 0, its slope sqrt(x) tends to 0, and the
factor reader that knows a positive base to a real power is positive never
saw the power. floor(x^(3/2)), floor(x^pi), floor(x^2 sqrt(x)) and
ceil(-x sqrt(x)) at 0 from the right are now 0, and floor(sqrt(x^3)) and
floor(sinh(2)^log(2, x)) too, where each was left unevaluated.

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

codecov Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.79%. Comparing base (569640b) to head (02ad16b).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2388      +/-   ##
==========================================
- Coverage   86.79%   86.79%   -0.01%     
==========================================
  Files         312      312              
  Lines       69204    69205       +1     
  Branches    20179    20179              
==========================================
  Hits        60069    60069              
- Misses       4920     4921       +1     
  Partials     4215     4215              
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.33% <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.79% <100.00%> (+0.01%) ⬆️

... and 3 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 1c543f1 into master Nov 8, 2026
35 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AngouriMath Nov 8, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the feature/step-of-a-power branch November 8, 2026 08:50
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