JuliaLang/julia

Printf for complex numbers

Ouverte

#58 617 ouverte le 3 juin 2025

 (4 commentaires) (0 réaction) (0 personne assignée)Julia (5 773 forks)batch import
complexdisplay and printingfeaturehelp wanted

Métriques du dépôt

Stars
 (48 709 étoiles)
Métriques de merge PR
 (Merge moyen 20j 6h) (157 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