W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2005

RE: [F&O] INF, -INF and NaN - literals?

From: Michael Kay <mhk@mhk.me.uk>
Date: Fri, 14 Jan 2005 12:49:42 -0000
To: "'Ashok Malhotra'" <ashok.malhotra@oracle.com>, "'Michael Rys'" <mrys@microsoft.com>, "'Colin Paul Adams'" <colin@colina.demon.co.uk>, <public-qt-comments@w3.org>
Message-ID: <E1CpQuA-0005Bt-4u@frink.w3.org>

> The IEEE spec spells out the lexical forms as well.
> 

You can't write

a := NaN

in Java or Fortran or any other language that supports IEEE floating point.
It would only be possible if NaN were a reserved word (or a predefined
constant) in the language. The only requirement is that you can cast from a
string having that form:

a := double("NaN")

and of course we allow that.

Michael Kay
Received on Friday, 14 January 2005 12:50:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:03 UTC