From 5b5e43e1fb9af65874915a1a9d92831f5d65b017 Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 18 Jul 2024 17:08:43 -0400 Subject: [PATCH] [printf]: input value should be exactly representable as 32-bit float (#2015) Fixed: #2009 --- test_conformance/printf/util_printf.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test_conformance/printf/util_printf.cpp b/test_conformance/printf/util_printf.cpp index 6e44b43fd..74be6af86 100644 --- a/test_conformance/printf/util_printf.cpp +++ b/test_conformance/printf/util_printf.cpp @@ -346,13 +346,15 @@ std::vector printFloatGenParameters = { // Double argument representing floating-point,with // exponent,left-justified,default(right)-justified + // Use a value that is exactly representable as 32-bit float. - { { "%-#20.15e" }, "789456123.0" }, + { { "%-#20.15e" }, "789456128.0" }, // Double argument representing floating-point,with // exponent,left-justified,with sign,capital E,default(right)-justified + // Use a value that is exactly representable as 32-bit float. - { { "%+#21.15E" }, "789456123.0" }, + { { "%+#21.15E" }, "789456128.0" }, // Double argument representing floating-point,in [-]xh.hhhhpAd style