04/28/2008 9:09 PM
post7433
|
I have a small program, which exposes different behaviors between QNX GCC and Linux GCC.
#include <stdio.h>
double xx;
main()
{
xx = 8.386248e-02;
printf("%.2e = %e\n", xx, xx);
}
I got the following result on Neutrino with the compilation of QNX gcc 3.3.5,
8.38e-02 = 8.386248e-02
But I got different result as below on Linux with gcc,
8.39e-02 = 8.386248e-02
I checked the binaries generated by different compilers and found the double precision rawdata are the same like below,
.long -252304933
.long 1068857346
So it looks like a QNX glibc problem. Can anybody have answer on this?
Thanks,
-Jiangning
|
|
|