Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

A difference of two intervals has the wrong ends, and loses a piece when the second lies inside the first

Offen
#2,290 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

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
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
csharp
Bereich
backend

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.LeftClosed at bRight, !B.RightClosed at bLeft), 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

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus ASC-Community/AngouriMath

Alle Issues in ASC-Community/AngouriMath

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.