This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
double precision problem
- To: gcc-help at gcc dot gnu dot org
- Subject: double precision problem
- From: Philippe Després <p0663835 at magellan dot umontreal dot ca>
- Date: Mon, 07 May 2001 18:35:02 -0400
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