Skip to content

printf with %g width specifier work abnormal in certain situation #269

@lc4

Description

@lc4
printf("(%10g)\n", 100000.0f);  // --> (100000)
printf("(%10g)\n", 100001.0f);  // --> (    100001)
printf("(%10g)\n", 99999.0f);   // --> (     99999)

The first line should output: ( 100000) instead.

Tested on version 2.3.0 and 2.4.0, same result.

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