The whole idea is wrong: the type
double
as any other numeric type, do not have "exponential form". The "exponential form" is only applicable to a string representing numbers, not the numbers themselves.
If you want to know how floating-point numbers are represented, please see: learn the standard IEEE 754:
http://en.wikipedia.org/wiki/IEEE_floating_point[
^].
It looks like you basically know how to control presentation of numbers in string form, but just in case:
http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx[
^],
http://msdn.microsoft.com/en-us/library/0c899ak8.aspx[
^].
If you think that "when tailNumber is incremented, and tailNumber is converted to string", think again: it is not converted. One of the worst related trends in the beginners these days is trying to work with strings representing data instead of data. Try not to fall there; this is a very bad thing. You need to convert data to string only when you have to represent it on screen or elsewhere and do all calculation only with numeric types, without a single conversion to a string, and without rounding off.
Finally, as to "exact number", you need to understand that floating-point numbers are not
real numbers, they only models real numbers to certain limited accuracy. It is apparent that a single real number generally contains infinite amount of information; to understand it, you need to learn the theory of real number in mathematics. To get an idea, please see:
http://en.wikipedia.org/wiki/Real_number[
^].
[EDIT]
Look at the precision of
double
:
http://en.wikipedia.org/wiki/Double-precision_floating-point_format[
^].
It's approximately 16 decimal digits. What do you expect then?
—SA