long double ld=1234567890.1234567890;
printf("This is a long double:\t%.9f\n", ld); // This is a long double: 1234567890.123456746
Works like a charm, as expected. Compiles fine in GCC-64, too, but there the output is 0.000000 8)
Any explanation?
gcc use msvcrt.dll ?
with gcc internal function__mingw_printf("This is a long double:\t%.9Lf\n", ld);
This is a long double with msvcrt printf: 0.000000000
This is a long double with mingw printf: 1234567890.123456717
Nice find, Timo!
-D__USE_MINGW_ANSI_STDIO useful too