mrstephengross wrote:
Hi all... How can I find out the number of significant digits (to the
right of the decimal place, that is) in a double? At least, I *think*
that's what I'm asking for. For instance:
0.103 --> 3
0.0103 --> 4
0.00103 --> 5
0.000103 --> 6
0.0000103 --> 7
Actually, from what I remember, all numbers you have here have the same
number of significant digits: 3, the leading (and trailing) zeros do not
count as significant.
And then there is no such thing as "significant digits" in a double. What
may appear as 0.0103 to you (in the output), in fact is probably something
like 0.010299999999999998 in the computer. IOW, all digits (16 or so) are
significant in a 'double'.
V