189. setprecision() not specified correctly

Section: 30.5.3.2 [fmtflags.state] Status: TC1 Submitter: Andrew Koenig Opened: 1999-08-25 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [fmtflags.state].

View all issues with TC1 status.

Discussion:

27.4.2.2 paragraph 9 claims that setprecision() sets the precision, and includes a parenthetical note saying that it is the number of digits after the decimal point.

This claim is not strictly correct. For example, in the default floating-point output format, setprecision sets the number of significant digits printed, not the number of digits after the decimal point.

I would like the committee to look at the definition carefully and correct the statement in 27.4.2.2

Proposed resolution:

Remove from 30.5.3.2 [fmtflags.state], paragraph 9, the text "(number of digits after the decimal point)".