Specify precision in the format flag for float4 hexadecimal output (#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>
This commit is contained in:
Cui, Dele
2024-09-19 15:30:10 +08:00
committed by GitHub
parent dd2117f5fc
commit 9f88b0b229

View File

@@ -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
@@ -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",