Re: Does "gfortran -O0" truncate floating point numbers to their expected precision?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 03 Jul 2013 08:04:59 -0400, Tim Prince <n8tm@xxxxxxx> wrote:
> This doesn't look to me like F77, although it contains some F66.

Sorry, I write broken Fortran.

>
> If you are using 32-bit gfortran, the i486 code with x87 instructions is particularly prone to this kind of problem. Did you try -march=native, or, if using an extremely old CPU, -ffloat-store?
>
> --
> Tim Prince

I am using gfortran for x86 and x86_64 and got similar problems on both.
Met this problem when I used "-march=native -O4". Problem disappeared
with "-march=native -O4 -ffloat-store".
Thank you for mentioning "-ffloat-store". This is exactly what I was
looking for.

BTW, The performance impact is significant. Now I have modified my
algorithm so that it does not rely on the precision given by
-ffloat-store.

Guan




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux