Trailing zeros are removed from the fractional portion of the result and a decimal-point character appears only if it is followed by a digit. Normally the result is right-justified. If the result doesn't start with a plus or minus sign, prefix it with a space instead. This flag is ignored if the - flag is also specified. For these conversions, the default precision is 6 .
Significant digits are the first digit before the decimal point, and all the digits after it.
G , it is treated like a value of 1 . If the value being printed cannot be expressed precisely in the specified number of digits, the value is rounded to the nearest number that fits.