有关浮点数和double的精度(http://www./cpp-tutorial/25-floating-point-numbers/): Variables of type float typically have a precision of about 7 significant digits (which is why everything after that many digits in our answer above is junk). Variables of type double typically have a precision of about 16 significant digits. Variables of type double are named so because they offer approximately double the precision of a float.