printf format specifier with zero padding behaves incorrectly for negative zero (-0.0
) on .NET Core
#15558
Labels
Area-Library
Issues for FSharp.Core not covered elsewhere
Bug
Impact-Low
(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
printf
formatting a value of-0.0
with%010f
(or anything which adds some zero padding) incorrectly places the-
symbol.Expected behavior
sprintf "%010.3f" -0.0
should display-00000.000
sprintf "%010.3f" -0.0
should display00000.000
(to match .NET Framework).This works correctly for other negative values. For example,
sprintf "%010.3f" -0.01
displays-00000.100
.Actual behavior
Displays
0000-0.000
Known workarounds
None known.
Related information
Potentially related to: #15557
The text was updated successfully, but these errors were encountered: