Repository navigation
Read a difference with 0 as what it subtracts 0 from, for a sign near a point - #2388
Merged
Merged
Conversation
… 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>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A step function arriving at 0 asks the sign of its argument, and now gets it. At a jump,
floorandceilask which side their argument arrives from, as the sign of the argument less the jump. When the jump is 0, that difference isg - 0, and the sign reader did not read it asg.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 ofx^(3/2)diverges at 0, and its slopesqrt(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 inHoldsNearask their sign the same way and get the same reading.floor(x^(3/2)),floor(x^pi),floor(x^2 sqrt(x))at 0+0ceil(-x sqrt(x))at 0+0floor(sinh(2)^log(2, x))at 0+0, 4.5 sfloor(1/x)at +oo, at -oo0,-1floor(log(x - 1, x))at 1+-1From the left of 0,
x^(3/2)is not real, andfloor(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, mostlyfloor(c/x)andfloor(e^x)inside something else. I checked eleven by hand, for examplefloor(x/log(x, x))at 0-, which is -1 becauselog(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 slowfloor(sqrt(x^3)). No issue was filed.🤖 Generated with Claude Code