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

Re: not-a-number's


> Well, I have an Intel manual here that states that any operation on a
> QNaN should return a QNaN, which means that also the compare should
> return a QNaN when one or both of the arguments is a QNaN.

No, that isn't how comparisons work.  The correct result is 2 according to the 
comparison rules of IEEE-754.  I'd suggest reading page 8 of "Lecture Notes on 
the Status of IEEE 754" by Kahan:
  http://www.cs.berkeley.edu/~wkahan/ieee754status/IEEE754.PDF

-- 
Eric Botcazou


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