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: Incorrect runtime behavior involving comparison


"Matt Austern" <austern@isolde.engr.sgi.com> said:
> SYMPTOM:
> The correct output from the following program is:
> t1 is false
> t2 is false

You are comparing two "should be equal" floating point expressions,
depending on rounding and the phase of the moon, you will get different
results.
-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viņa del Mar, Chile                               +56 32 672616

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