<<< | Index | >>> |
The value is represented with exact fraction part as specified by the precision.
In default notation the precision specifies max number of meaningful digits to display before and after the decimal point.
Precision can be changed by precision member function of the stream:
#include <iostream> void main() { const double PI = 3.1415926; std::cout.precision( 7 ); std::cout << PI << '\n'; } /* Output: 3.141593 */
<<< | Index | >>> |