As shown in the tutorial http://www.cplusplus.com/reference/iomanip/setprecision/
// setprecision example
#include // std::cout, std::fixed
This is because "When floatfield is set to fixed, floating-point values are written using fixed-point notation: the value is represented with exactly as many digits in the decimal part as specified by the precision field (precision) and with no exponent part." ref. http://www.cplusplus.com/reference/ios/fixed/