Skip to content

Printf for complex numbers #58617

@aplavin

Description

@aplavin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexComplex numbersdisplay and printingAesthetics and correctness of printed representations of objects.featureIndicates new feature / enhancement requestshelp wantedIndicates that a maintainer wants help on an issue or pull request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions