Repository navigation
A step function at a jump takes the side its argument arrives from - #2283
Merged
Rafael-SOWNet merged 1 commit intoOct 31, 2026
Conversation
A limit of floor, ceil or sgn whose argument arrives on a jump was left unevaluated: limitleft(floor(x), x, 0) and limitright(sgn(x), x, 0) among them. The remark gave the reason that which side the argument arrives from is not the side x comes from, floor(2 - x^2) coming to 2 from below as x comes to 0 from the right. That side is the sign the argument less the jump keeps there, which SignNear reads off the limit or off the first derivative that does not vanish. floor gives the jump from above and one less from below, ceil one more from above and the jump from below, and sgn the side itself. A two-sided limit asks each side, and where they differ, as at a jump, it is NaN. StepFunctionAtAJumpTest takes sixteen limits; fifteen fail on master. FloorCeilTest and SignumLimitTest pinned the declines, and now pin the values: NaN for the two-sided limits, which do not exist, and the sign of the side for the one-sided ones, each still bounded in time, which is what they are for. The suite, the trio, F#, AOT and the eight harnesses pass. With #2268, which declines the substitution through a jump, the composed expressions are answered too: limitleft(floor(x) - 1, x, 0) is -2 and limit(floor(x) + x, x, 1) is NaN. Part of #2266. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2283 +/- ##
=======================================
Coverage 86.71% 86.71%
=======================================
Files 310 310
Lines 67845 67852 +7
Branches 19689 19694 +5
=======================================
+ Hits 58830 58839 +9
+ Misses 4895 4891 -4
- Partials 4120 4122 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Rafael-SOWNet
deleted the
a-step-function-at-a-jump-takes-the-side-its-argument-arrives-from
branch
October 31, 2026 02:59
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 limit of
floor,ceilorsgnwhose argument arrives on a jump was left unevaluated, even where the side is plain:limitleft(floor(x), x, 0),limitright(sgn(x), x, 0). The side the argument arrives from is not always the sidexcomes from:floor(2 - x^2)comes to 2 from below asxcomes to 0 from the right. It is the sign that the argument minus the jump keeps near the destination.SignNearalready reads that from the limit, or from the first derivative that does not vanish.floorgives the jump from above and one less from below;ceilgives one more from above and the jump from below;sgngives the side itself. A two-sided limit asks each side, and when they differ, as at a jump, it is NaN.limitleft(floor(x), x, 0)-1limitright(floor(2 - x^2), x, 0)1limitright(sgn(x^3 - x), x, 0)-1limit(floor(x), x, 1)NaNlimit(sgn(x), x, 0)NaNStepFunctionAtAJumpTest: 15 of its 16 cases fail on master.FloorCeilTestandSignumLimitTestpinned the old declines. They now pin the values: NaN for the two-sided limits, which do not exist, and the side's sign for the one-sided ones. Each is still bounded in time, which is what those tests are for. The suite (18,272), the trio, F#, AOT and the eight harnesses pass locally.This complements #2268. That PR stops substitution from evaluating straight through a jump, and this one gives the step's own limit. Built together, the composed expressions are answered correctly:
limitleft(floor(x) - 1, x, 0)is-2,limitleft(arcsin(floor(x)), x, 0)is-pi/2, andlimit(floor(x) + x, x, 1)is NaN. Each of the two is measured alone, and they touch different files.Part of #2266.
🤖 Generated with Claude Code