Hello!
(Note that the following could perhaps have been placed under "General discussions" since I'm not sure if it is a bug!)
The following code
#include <stdio.h>
#include <math.h>
int main(void)
{
printf("%f\n", sqrt(4.0L));
printf("%lf\n", sqrt(4.0L));
printf("%Lf\n", sqrt(4.0L));
return 0;
}
produces differing ouputs in different compilers. (See below...)
Does anyone know if the C99 standard specifies what the exact ouput should be?
Kind regards,
Albert
Pelles C Ouput:
2.000000
2.000000
2.000000
Lcc-win32 Output:
0.000000
0.000000
2.000000
GCC Output (gcc from cygwin: "gcc -v" says:version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125))
2.000000
2.000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 and so on 0000000000000.000000