Skip to content

Unexpected output from intel fmt::fprint #3645

Closed
@gsjaardema

Description

@gsjaardema

With the following program:

#include <fmt/printf.h>
int main()
{
    fmt::printf("%d:%d %f %s\n", 3, 1234, 12.345, "weekend");
}

I get the expected output on most compiler and lib::fmt version combinations:

3:1234 12.345000 weekend

However, if I use the intel compiler with either 10.0.0 or trunk, I get:

3:1234 12.345001 weekend

Notice the 1 at the end of the floating point output. I'm not sure where this is coming from or how to get the same output on intel with 10.0.X as I get with intel and earlier lib::fmt versions or with all other compilers I have tried.

Here is a compiler explorer link: https://godbolt.org/z/MzG7T9bfr

Metadata

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