A difference of two intervals has the wrong ends, and loses a piece when the second lies inside the first
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 72/100
Rechercherichtung
Start with Sources/AngouriMath/Core/Entity/Omni/Sets/SetOperators.SetSubtraction.cs, especially SetSubtractIntervalAndInterval, whose final returns the issue identifies. Find the existing tests for interval subtraction and add coverage for the listed endpoint and containment cases. Done means the results preserve the correct interval pieces and endpoints, and membership agrees with those results.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
A difference of two intervals, on master (87a0eff), Simplify():
| Answered | Should be | |
|---|---|---|
[0; 10] \ (2; 3) |
[0; 3] |
[0; 2] \/ [3; 10] |
[0; 10] \ [2; 3] |
(0; 3] |
[0; 2) \/ (3; 10] |
(0; 10) \ (2; 3) |
[0; 3) |
(0; 2] \/ [3; 10) |
[0; 10] \ [-1; 3) |
(3; 10] |
[3; 10] |
[0; 10] \ (-1; 3] |
[3; 10] |
(3; 10] |
[0; 10] \ (5; 12] |
[0; 5) |
[0; 5] |
[0; 10] \ [5; 12) |
[0; 5] |
[0; 5) |
[0; 10] \ (0; 3) |
[3; 10] |
{ 0 } \/ [3; 10] |
[0; 10] \ (7; 10) |
[0; 7] |
[0; 7] \/ { 10 } |
Evaled gives the same sets, and membership follows them: 5 in ([0; 10] \ (2; 3)) simplifies to False. A finite set on the right, [0; 10] \ { 5 }, is left as it is, which is right.
The cause is the last three returns of SetOperators.SetSubtractIntervalAndInterval:
- When B lies strictly inside A, the fallback builds one interval from A's left end to B's right end, where the answer is the two pieces on either side of B.
- When B covers one end of A, the end of the cut is read from B's other end (
!B.LeftClosedatbRight,!B.RightClosedatbLeft), so it comes out right only when B is closed at both ends or open at both. - When A and B share an end that A contains and B does not, that point is folded into the flag of the cut instead of being kept as
{ a }.
Found while building a number-line view of \ for browser demos of the library.
- Vorherrschende Sprache
- C#
- Sterne
- 831
- Forks
- 79
- Ø Merge
- 1 Std. 10 Min.
- Gemergte PRs (30 T.)
- 531
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ASC-Community/AngouriMath
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ASC-Community/AngouriMath#2220 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
ASC-Community/AngouriMath#2293 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
ASC-Community/AngouriMath#2292 ·
Maintainer antworten meist innerhalb von 1 Tag
-
A Taylor expansion differentiates without simplifying, so sin(x)/x to 11 terms runs out of memoryOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
ASC-Community/AngouriMath#2291 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Compiled, a scalar over a matrix argument divides by each entry, where evaluation invertsEvtl. vergeben @Rafael-SOWNet hat das heute übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
ASC-Community/AngouriMath#2287 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in ASC-Community/AngouriMath
Ähnliche Issues
-
bug effort:S P3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
nightscout/nocturne#3136 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 76/100
GameShowLDA/AskMkiM#1075 ·
Maintainer antworten meist innerhalb von 1 Tag
-
is:fix
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
nunit/nunit#5537 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag