Skip to content

Commit

Permalink
Specify precision in the format flag for float4 hexadecimal output (K…
Browse files Browse the repository at this point in the history
…hronosGroup#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 authored and yanfeng3721 committed Oct 24, 2024
1 parent 6666b85 commit 361b239
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 @@ -955,7 +955,7 @@ std::vector<printDataGenParameters> printVectorGenParameters = {

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

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

// Eight component vector in the shortest float representation

Expand Down Expand Up @@ -1007,7 +1007,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 361b239

Please sign in to comment.