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 126.96.36.199 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 188.8.131.52 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