| Author |
Message |
|
|
|
Post subject: double precision issue
Posted: Apr 25, 2008 - 03:25 AM
|
|
New Member
Joined: Apr 25, 2008
Posts: 1
|
|
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 glibc problem. Can anybody have answer on this?
Thanks,
-Jiangning |
|
|
| |
|
|
|
 |
|
|
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group Credits |
|
|