JuliaLang/julia

Printf for complex numbers

Open

#58,617 opened on 2025年6月3日

GitHub で見る
 (4 comments) (0 reactions) (0 assignees)Julia (5,773 forks)batch import
complexdisplay and printingfeaturehelp wanted

Repository metrics

Stars
 (48,709 stars)
PR merge metrics
 (平均マージ 20d 6h) (30d で 157 merged PRs)

説明

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.

コントリビューターガイド