mirror of
https://github.com/fmtlib/fmt.git
synced 2025-10-28 04:31:44 +01:00
Fix handling of subnormals in exotic FP
This commit is contained in:
@@ -1009,6 +1009,8 @@ TEST(format_test, precision) {
|
||||
if (std::numeric_limits<long double>::digits == 64) {
|
||||
auto ld = (std::numeric_limits<long double>::min)();
|
||||
EXPECT_EQ(fmt::format("{:.0}", ld), "3e-4932");
|
||||
EXPECT_EQ(fmt::format("{:0g}", 5.02957084971264961283E-4940L),
|
||||
"5.02957e-4940");
|
||||
}
|
||||
|
||||
EXPECT_EQ("123.", fmt::format("{:#.0f}", 123.0));
|
||||
|
||||
Reference in New Issue
Block a user