This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Strange results with -mfpmath=sse
- From: Arjen Markus <arjen dot markus895 at gmail dot com>
- To: Dominique Dhumieres <dominiq at lps dot ens dot fr>
- Cc: fortran at gcc dot gnu dot org
- Date: Fri, 1 May 2009 13:39:52 +0200
- Subject: Re: Strange results with -mfpmath=sse
- References: <20090501112632.DA0633BAB9@mailhost.lps.ens.fr>
Hello Dominque,
it was exactly this thread that inspired me to have a look again at this program
(or a variant thereof - an example I have been using for in-house
courses for the
past couple of years). I replied to it with the test results - some
combinations
of flags give exactly the sort of things I would expect (not
necessarily the ones
I regard as correct), but this particular combination was way off!
(I realised there is a bug in 10.0**i when I saw NaNs for double-precision with
-ffloat-store, but the numbers reported here are, uh, weird)
Regards,
Arjen
2009/5/1 Dominique Dhumieres <dominiq@lps.ens.fr>:
> Arjen,
>
> I am not an expert with *86 architecture, but your problem seems
> related to the "extended floats" in the legacy *87. You may have a look to
>
> http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/4bca729841ee871a#
>
> and the pointer therein.
>
> Another point is that the lines
>
> x = 10.0 ** i
> y = - 10.0 ** i
>
> should be changed to use 10.0_wp, otherwise you are using real(4) for the rhs.
>
> Cheers
>
> Dominique
>