13.7.5. Floating-Point Numbers; Scientific and Fixed Notation (scientific, fixed)
The sticky stream manipulators
fixed control the output format of floating-point numbers. Stream manipulator scientific forces the output of a floating-point number to display in scientific format. Stream manipulator fixed forces a floating-point number to display a specific number of digits (as specified by member function
precision or stream manipulator
setprecision) to the right of the decimal point. Without using another manipulator, the floating-point-number value determines the output format.
Figure 13.18 demonstrates displaying floating-point numbers in fixed and scientific formats using stream manipulators
scientific (line 18) and
fixed (line ...