"6 digits after the decimal point" is nonesnse, and your example is a good demonstration of this.
This is an exact specification of the float
data type.
The precision of the float
is 24 bits. There are 23 bits denoting the fraction after the binary point, plus there's also an "implicit leading bit", according to the online source. This gives 24 significant bits in total.
Hence in decimal digits this is approximately:
24 * log(2) / log(10) = 7.22
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…