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: infinity != infinity (Joern Rennecke) writes:

>> The standard is apparently less than explicit on this particular point.  
>> But e.g.
>> says the intent was that infinity was supposed to compare equal with
>> itself:
>> > To remove doubt as to the intent: In an implementation guide to a draft
>> > version of the standard, Coonen [_Computer_, 13: 1, p. 78] gives a table
>> > which clearly shows that +oo = +oo and -oo = -oo are to be TRUE.
> But the question remains, was this derived from his note of the standards
> commitee meetings, or from his personal interpretation of the standard
> (or maybe even his preconception of what it should be) ?

There is a strong indication of the intent of the standard in Appendix A
(not normative) of IEEE 754:

    7. Isnan(y), or equivalently x != x, returns the value TRUE if x is a
       NaN, and returns FALSE otherwise.

Also, the standard only talks about unordered relations in connection with


Andreas Schwab, SuSE Labs,
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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