FP comparisons, C, X86, and NaN's

Joseph S. Myers jsm@polyomino.org.uk
Sun Jun 20 09:28:00 GMT 2004


On Sat, 19 Jun 2004, Chris Lattner wrote:

> I'm trying to understand the standards relating to floating point
> comparisons in C, particularly with respect to NaN's.  From my
> interpretation of the whole mess, in C99, standard relational operations
> (like X < Y) should trap on NaN's, including SNaNs.

That would presumably be defined by IEC 60559:1989, a normative reference
for C99, in conjunction with Annex F.  I don't have a copy of IEC 60559.
www.iec.ch indicates it is available for CHF 89 (for a 45-page document).

-- 
Joseph S. Myers
jsm@polyomino.org.uk



More information about the Gcc mailing list