This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: FP comparisons, C, X86, and NaN's
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Chris Lattner <sabre at nondot dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 20 Jun 2004 09:28:54 +0000 (UTC)
- Subject: Re: FP comparisons, C, X86, and NaN's
- References: <Pine.LNX.4.44.0406192046030.13542-100000@nondot.org>
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