`3 i` parses as `3 ^ i`: an imaginary literal after a factor is read as its exponent
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
- 70/100
Rechercherichtung
Start with Syntax.md and SyntaxDocumentedTest, which document and pin the current juxtaposition rule. Trace the parser entry point used by ToEntity() and inspect how imaginary literals are classified after a factor. Done means the proposed imaginary-literal cases parse as multiplication, existing power cases remain unchanged, and the documentation test reflects the new rule.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
3 i parses as 3 ^ i, not 3 * i, so sin(3 i) is evaluated at 3^i (about 0.455 + 0.891i):
"sin(3 i)".ToEntity() -> sin(3 ^ i)
"x i".ToEntity() -> x ^ i
"(1 + 2) i".ToEntity() -> (1 + 2) ^ i
"2 i x".ToEntity() -> 2 ^ i * x
2.5.0 does the same. The juxtaposition rule inserts ^ before a number written after a number, a name or ), so that x2 is x ^ 2. The lexer reads i as a number, so the rule applies to it as well. Syntax.md records this as a consequence of the rule since #1041, and SyntaxDocumentedTest pins "x i" as "x ^ i".
Proposal: an imaginary literal written after a factor is a factor too. 3 i would be 3 * i and x 2i would be x * 2i, while x2, 3 2 and (x + 1)2 stay powers. 3i, written as one literal, is already 3i. I'd change the rule and the documented row together. Is that the reading you want?
- Vorherrschende Sprache
- C#
- Sterne
- 831
- Forks
- 79
- Ø Merge
- 2 Std. 22 Min.
- Gemergte PRs (30 T.)
- 507
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 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
ASC-Community/AngouriMath#1807 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
ASC-Community/AngouriMath#1692 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
ASC-Community/AngouriMath#1690 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
ASC-Community/AngouriMath#1689 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
ASC-Community/AngouriMath#1684 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in ASC-Community/AngouriMath
Ähnliche Issues
-
security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Sendspin/sendspin-dotnet#339 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
owasp-dep-scan/dosai#79 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
pyrevitlabs/pyRevit#3730 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 69/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug component/other
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
umbraco/Umbraco.AI#511 ·
Maintainer antworten meist innerhalb von 1 Tag