This is due to the fact that the floating point format, as a rule, is focused on preserving a certain number of significant digits.
std::cout.setf(std::ios::fixed);
std::ios::fixed
"" ( ). , . , - precision()
.
std::ios::fixed
( precision()
) , ( gcc 7.2.1, Coliru):
1.1134e-13
1.1134000000000001e-13
1.1134000000000002e-13
1.1134000000000003e-13
1.1134000000000005e-13
1.1134000000000006e-13
1.1134000000000007e-13
1.1134000000000008e-13
1.113400000000001e-13
1.1134000000000011e-13
1.1134000000000012e-13
... ..
( e-13
) , std::ios::fixed
.
source
share