The problem is that a float and double are each stored as two parts, a mantissa and an exponent and that they are each in terms of powers of two. It's the exponent that gives floating point such a wide range, but at the expense of mantissa accuracy. I think that mantissa float accuracy is about 24 binary bits and about 48 bits for double. If you divide those by 3 (a very rough guide), you get about 8 and 16 decimal digit accuracy. Iow, you should not depend on more than about 6 or 14 bit accuracy respectively for each one. Use the format classes to produce no more than the required number of digits. [ June 19, 2004: Message edited by: Eddie Vanda ]
The nice thing about Standards is that there are so many to choose from!