This is the mail archive of the 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]
Other format: [Raw text]

Re: Revision 162491 -- fortran -fwhole-file regressions

Dave Korn wrote:

On 24/07/2010 07:39, Tobias Burnus wrote:

I think reverting the patch is the wrong solution. If you use
-ffloat-store, the tests are successful. The reason is that one now
inlines the function and uses the result from the register instead from
memory. And as the x87 coprocessor has an excess precision, the
comparison fails. As on x86-64 one uses SSE it works there.

Ah, this is Return of the Revenge of PR323 Strikes Back! :-P

  Could fortran be made to usefully implement -fexcess-precision=standard?
I'm surprised this hasn't been more of an issue given the prevalence of big
number-crunching apps in the fortran world.

That is because Fortran (the Language) makes no promises. All arithmetic is "an approximation to the mathematically exact result".

So basically, if you really, really want to compare two REALs (or DOUBLE PRECISION numbers) for equality, you have to know what you're doing.


Toon Moene - e-mail: - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home:; weather:
Progress of GNU Fortran:

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