This is the mail archive of the gcc-bugs@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]

Re: (a <= 0.5) and (a > 0.5) both fail with intervening output


>I don't know whether this classifies as a bug or as 'the usual trouble
>with floating point numbers'; in any case, it was a nasty surprise to me.

It's "the usual trouble", I'm afraid.  There have been proposals made
to eliminate this particular sort of trouble in egcs/gcc, but they've
been shouted down (last December) due to worries about performance.
The egcs mailing-list archives contain most/all of the discussion,
if you're interested.

So, for now, you're expected to code around the problem.  Use of
`volatile' is one way.

For a bit more discussion of the problem, see the node "Floating-point
Errors" in the g77 documentation.  It contains some references to
other docs, near the end of that node.

        tq vm, (burley)


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