Skip to content

Incorrect printing of float/double in 7.1.1 #1976

Closed
@madscientist

Description

I'm seeing a problem printing with {:f} in 7.1.1.

Here is the test program:

#include <fmt/core.h>

int main()
{
    double dbl = (double)9223372036854775807;
    fmt::print("double {:f}\n", dbl);
    return 0;
}

In 7.0.3 I get reasonable results:

double 9223372036854775808.000000

In 7.1.1 I get something I can't understand at all:

double B446744073709551616.000000

This is on a GNU/Linux system compiled with GCC 10.2.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions