ios::precision
int precision( int np );
int precision() const;
Return Value
The first overloaded precision function sets the stream’s internal floating-point precision variable to np and returns the previous value. The default precision is six digits. If the display format is scientific or fixed, the precision indicates the number of digits after the decimal point. If the format is automatic (neither floating point nor fixed), the precision indicates the total number of significant digits.
The second function returns the stream’s current precision value.
Parameter
np
An integer that indicates the number of significant digits or significant decimal digits to be used for floating-point display.
ios Overview | Abstract Stream Base Class
See Also ios setprecision manipulator