Skip to content

Commit

Permalink
Specify precision in the format flag for float4 hexadecimal output (#…
Browse files Browse the repository at this point in the history
…2064)

This will ensure consistent output on any conforming implementation.
Note that the specification does not define the output style when
precision is missing.

---------

Signed-off-by: Cui, Dele <dele.cui@intel.com>
  • Loading branch information
delecui committed Sep 19, 2024
1 parent dd2117f commit 9f88b0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test_conformance/printf/util_printf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ std::vector<printDataGenParameters> printVectorGenParameters = {

// Four component vector in hexadecimal floating point, lowercase format

{ { "" }, "(0.25f,0.5f,1.f,1.5f)", "%", "hla", "float", "4" },
{ { "" }, "(0.25f,0.5f,1.f,1.5f)", "%.1", "hla", "float", "4" },

// Eight component vector in the shortest float representation

Expand Down Expand Up @@ -1231,7 +1231,7 @@ std::vector<std::string> correctBufferVector = {

"1.23e+03,9.88e+05,5.00e-04",

"0x1p-2,0x1p-1,0x1p+0,0x1.8p+0",
"0x1.0p-2,0x1.0p-1,0x1.0p+0,0x1.8p+0",

"1,2,3,4,1.5,3.14,2.5,3.5",

Expand Down

0 comments on commit 9f88b0b

Please sign in to comment.