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

XML Schema, following IEEE 754, defines INF, -INF and NaN as legal
lexical forms for xs:float and xs:double.  If you define an attribute
foo of type xs:float in a Schema, a conforming document can have 
foo = NaN as well as foo = 12.5e34.

XQuery can choose to depart from this convention if we so desire but
it will confuse some users.  

All the best, Ashok
 

> -----Original Message-----
> From: public-qt-comments-request@w3.org 
> [mailto:public-qt-comments-request@w3.org] On Behalf Of Michael Kay
> Sent: Friday, January 14, 2005 1:33 AM
> To: 'Ashok Malhotra'; 'Colin Paul Adams'; public-qt-comments@w3.org
> Subject: RE: [F&O] INF, -INF and NaN - literals?
> 
> 
> > 
> > This is actually a comment on the XPath grammar.
> > These 3 literals need to be defined as numeric literals in section 
> > 3.1.1.
> 
> 
> With respect, Ashok, there are no such literals, and the F+O 
> document shouldn't be using them in examples. They need to be 
> written as xs:double("INF"), xs:double("-INF"), and xs:double("NaN").
> 
> Michael Kay
> 
> 
> 
> 

Received on Friday, 14 January 2005 10:51:41 UTC