Repository navigation
A difference of two intervals keeps the parts on either side - #2300
Merged
Rafael-SOWNet merged 1 commit intoOct 31, 2026
Merged
Conversation
A \ B for two intervals is now the part of A below B and the part
above it, each an interval, a point or nothing, and each holding the
end of B that B does not. The last three returns of
SetSubtractIntervalAndInterval answered one interval from an end of A
to the far end of B where B lay inside A, so [0; 10] \ (2; 3) was
[0; 3]. Where B covered an end of A, they read the end of the cut from
B's other end, so [0; 10] \ [-1; 3) was (3; 10]. And an end of A that B
left was folded into a flag, so [0; 10] \ (0; 3) lost the point 0.
Membership followed: 5 in ([0; 10] \ (2; 3)) was False.
The ends are compared by their values, as the intersection compares
them, and kept as written, so [0; sqrt(2)] \ [1; 2] is [0; 1) where it
was left as written. Ends with no value decide only when they are the
same and B holds every end A holds: (a; b) \ [a; b] is empty, where it
was (a; b). [a; b] \ (a; b) is { a, b } where a < b and nothing where
a > b, so it is left as written, where it was [a; b].
IntervalAndInterval checks the issue's table and a few more, and that
the difference holds a point exactly where A does and B does not, over
every order of four ends from 0 to 3 with each end open or closed, 4096
pairs at nine points each. Nineteen of the new tests fail on master.
2.6.0 answers as master does. The suite, the trio, F#, AOT and the eight
harnesses pass.
Fixes #2290.
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 #2300 +/- ##
==========================================
+ Coverage 86.74% 86.76% +0.02%
==========================================
Files 310 310
Lines 67973 67974 +1
Branches 19744 19736 -8
==========================================
+ Hits 58961 58979 +18
+ Misses 4880 4872 -8
+ Partials 4132 4123 -9
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 \ Bfor two intervals is the part ofAbelowBand the part above it, each holding the end ofBthatBdoes not.[0; 10] \ (2; 3)[0; 3][0; 2] \/ [3; 10][0; 10] \ [-1; 3)(3; 10][3; 10][0; 10] \ (0; 3)[3; 10]{ 0 } \/ [3; 10][0; 10] \ (0; 10)[0; 10]{ 0, 10 }(-oo; +oo) \ [0; 1)(-oo; 1)(-oo; 0) \/ [1; +oo)[0; sqrt(2)] \ [1; 2][0; 1)(a; b) \ [a; b](a; b){ }[a; b] \ (a; b)[a; b]{ a, b }wherea < band nothing wherea > b5 in ([0; 10] \ (2; 3))FalseTrueIntersectIntervalAndIntervalcompares them, and kept as written.IntervalAndIntervalchecks membership at nine points for every order of four ends from 0 to 3, with each end open or closed: 4,096 pairs. 19 of the new tests fail on master.Fixes #2290.
🤖 Generated with Claude Code