formatting floating point

Saaa empty at needmail.com
Sat Jul 11 15:44:55 PDT 2009


> double d[2] = [ 0, 1, double.max];
> char[] c = format(d);
>
> How do I get c to represent full precision?
>
> "[0,1,1.7976931348623157e+308]" // but then with double.max being
> represented fully

> You want a 309-digit number consisting mostly of 0s?

Yes, but only if they are necessary.
0 doesn't need all hose digits for instance.

What else is the point in saving doubles.
 




More information about the Digitalmars-d-learn mailing list