This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

double precision problem


Hello,

I am working on a nonlinear dynamics project and I recently pass from
visual C++ on Windows to gcc on linux (x86). I need finite precision on
double representation, and I can't have it with gcc . Example:

double x=cos(0.2); (16 digits)
printf("%20.20f",x) on windows gives
x=0.98006657784124163000;
 while on linux, the last 3 digits are non-zero. How do I tell the
compiler to force those 3 digits to be 0?? I have tried --ffloat-store
option without positive results.

Thanks,
Philippe, Québec


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]