JuliaLang/julia

Printf for complex numbers

Open

#58.617 geöffnet am 3. Juni 2025

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Julia (5.773 Forks)batch import
complexdisplay and printingfeaturehelp wanted

Repository-Metriken

Stars
 (48.709 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 23T 11h) (145 gemergte PRs in 30 T)

Beschreibung

Currently, @sprintf "%.2f" (1+2im) errors, but it would make sense for it to produce "1.00 + 2.00im" I think. Currently, printfing a complex number is not really convenient, requiring a manual split into real + complex, and keeping the format string in sync between them.

Contributor Guide