Defect Report #137
Submission Date: 30 Apr 94
Submittor: Project Editor (P.J. Plauger)
Source: Larry Jones
Is printf("%.1f", -0.01) required to produce 0.0, -0.0,
or are both acceptable?
Subclause 184.108.40.206 says that when the + flag is not specified, the
result begins with a sign only when a negative value is converted.
The description of the f conversion (also e and E)
says that the value is rounded to the appropriate number of digits.
Is the value used to determine the sign of the result the value before
or after rounding?
As specified in subclause 220.127.116.11 for the + flag, a negative
value is being converted, so a minus sign is required. The intent
is that the sign is determined prior to conversion.
Previous Defect Report
< - >
Next Defect Report