streamsize precision() const;
streamsize precision( streamsize new_precision );
Manages the precision (i.e. how many digits are generated) of floating point output performed by std::num_put::do_put.
The default precision, as established by std::basic_ios::init, is 6.
|new_precision||-||new precision setting|
 Return value
The precision before the call to the function
The default precision is 6 With default precision d is 12.3457 With high precision d is 12.345679
 Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
|DR||Applied to||Behavior as published||Correct behavior|
|LWG 189||C++98|| 'precision' was defined as 'the number of digits after
the decimal point', but it is not correct in some cases
 See also
| manages field width |
(public member function)
| changes floating-point precision |