JuliaLang/julia

Printf for complex numbers

Open

#58 617 ouverte le 3 juin 2025

Voir sur GitHub
 (4 commentaires) (0 réactions) (0 assignés)Julia (5 773 forks)batch import
complexdisplay and printingfeaturehelp wanted

Métriques du dépôt

Stars
 (48 709 stars)
Métriques de merge PR
 (Merge moyen 23j 11h) (145 PRs mergées en 30 j)

Description

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.

Guide contributeur