printf formatting a value of -0.0 with %010f (or anything which adds some zero padding) incorrectly places the - symbol.
Expected behavior
.NET Core: sprintf "%010.3f" -0.0 should display -00000.000
.NET Framework: sprintf "%010.3f" -0.0 should display 00000.000
This works correctly for other negative values. For example, sprintf "%010.3f" -0.01 displays -00000.100.
Original text
`sprintf "%010.3f" -0.0` should display `-00000.000` `sprintf "%010.3f" -0.0` should display `00000.000` (to match .NET Framework).
Actual behavior
Displays 0000-0.000
Known workarounds
None known.
Related information
Potentially related to: #15557
printfformatting a value of-0.0with%010f(or anything which adds some zero padding) incorrectly places the-symbol.Expected behavior
.NET Core:
sprintf "%010.3f" -0.0should display-00000.000.NET Framework:
sprintf "%010.3f" -0.0should display00000.000This works correctly for other negative values. For example,
sprintf "%010.3f" -0.01displays-00000.100.Original text
`sprintf "%010.3f" -0.0` should display `-00000.000``sprintf "%010.3f" -0.0` should display `00000.000` (to match .NET Framework).Actual behavior
Displays
0000-0.000Known workarounds
None known.
Related information
Potentially related to: #15557