Skip to content

Incorrect formatting small negative floats #124327

@bomzheg

Description

@bomzheg

Bug report

Bug description:

>>> f"{-0.00000001:.2f}"
'-0.00'

expected result is 0.00

CPython versions tested on:

3.10, 3.11, 3.12

Operating systems tested on:

Linux, Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions