Closed
Description
Docs:
According to http://fmtlib.net/latest/syntax.html#grammar-token-int_type and https://en.cppreference.com/w/cpp/io/c/fprintf type :g
must remove trailing zeroes:
Unless alternative representation is requested the trailing zeros are removed, also the decimal point character is removed if no fractional part is left`.
Current behaviour:
double arg = 0.1;
std::string output = fmt::format("{%.16g}", arg);
produces 0.1000000000000000
Metadata
Metadata
Assignees
Labels
No labels