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

> 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