"%a" formatting differences

bearophile bearophileHUGS at lycos.com
Mon Dec 14 10:28:09 PST 2009


Do you know what's causing the difference in the outouts?

void main() {
  double d1 = 3.14159;
  printf("%a\n", d1);
  writefln("%a\n", d1);
}

Outputs:
0x1.921f9f01b866ep+1
0xc.90fcf80dc337p-2

A printf in C code compiled with GCC prints the same as the printf here.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list