-
Notifications
You must be signed in to change notification settings - Fork 825
Labels
Area-LibraryIssues for FSharp.Core not covered elsewhereIssues for FSharp.Core not covered elsewhereBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
Description
printf
formatting a value of -0.0
with a %f
format specifier and setting the +
flag adds a plus and a minus sign to the result.
sprintf "%f" +0.0 // 0.000000 (correct)
sprintf "%f" -0.0 // -0.000000 (correct)
sprintf "%f" -0.0000001 // -0.000000 (correct)
sprintf "%+f" +0.0 // +0.000000 (correct)
sprintf "%+f" -0.0 // +-0.000000 (incorrect)
sprintf "%+f" -0.0000001 // -0.000000 (correct)
Expected behavior
sprintf "%+f" -0.0
should display -0.000000
sprintf "%+f" -0.0
should display +0.000000
(to match .NET Framework behavior).
Actual behavior
Displays +-0.000000
Known workarounds
None known.
Related information
Potentially related to: dotnet/runtime#70460
- macOS 12.6
- .NET 6.0.15
Metadata
Metadata
Assignees
Labels
Area-LibraryIssues for FSharp.Core not covered elsewhereIssues for FSharp.Core not covered elsewhereBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
Type
Projects
Status
New