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

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

From: Michael Rys <mrys@microsoft.com>
Date: Fri, 14 Jan 2005 03:39:55 -0800
Message-ID: <BAE415CEAA831548800F68C44E905AF5014364D0@RED-MSG-60.redmond.corp.microsoft.com>
To: "Ashok Malhotra" <ashok.malhotra@oracle.com>, "Colin Paul Adams" <colin@colina.demon.co.uk>, <public-qt-comments@w3.org>

Sure we can. XQuery supports these values in the value spaces of
xs:double and xs:float. It's just that writing the constant value is a
bit more complex.

Best regards
Michael

> -----Original Message-----
> From: Ashok Malhotra [mailto:ashok.malhotra@oracle.com]
> Sent: Friday, January 14, 2005 3:35 AM
> To: Michael Rys; Colin Paul Adams; public-qt-comments@w3.org
> Subject: RE: [F&O] INF, -INF and NaN - literals?
> 
> Then we cannot claim our float and double datatypes are IEEE,
> or XML Schema, conformant.
> 
> All the best, Ashok
> 
> 
> > -----Original Message-----
> > From: public-qt-comments-request@w3.org
> > [mailto:public-qt-comments-request@w3.org] On Behalf Of Michael Rys
> > Sent: Friday, January 14, 2005 3:13 AM
> > To: Colin Paul Adams; public-qt-comments@w3.org
> > Subject: RE: [F&O] INF, -INF and NaN - literals?
> >
> >
> > This is a bug in the F&O spec. While you can use INF, -INF
> > and NaN in a schema-validated document such as in
> > value="INF", in XQuery, you need to use the constructor
> > functions as Michael Kay says.
> >
> > Best regards
> > Michael
> >
> > > -----Original Message-----
> > > From: public-qt-comments-request@w3.org
[mailto:public-qt-comments-
> > > request@w3.org] On Behalf Of Colin Paul Adams
> > > Sent: Friday, January 14, 2005 12:23 AM
> > > To: public-qt-comments@w3.org
> > > Subject: [F&O] INF, -INF and NaN - literals?
> > >
> > >
> > > 15.4.2.1 Shows an example:
> > >
> > > fn:avg((INF, -INF)) returns NaN.
> > >
> > > Are INF, -INF and NaN supposed to be literals of type
> > xs:double, as is
> > > implied by this example (at least, that's the inference I draw)?
> > > Because the grammar for literals does not include them.
> > > Elsewhwere I can only find mention of them as special string
values
> > > for the xs:double constructor.
> > >
> > > My XPath parser currently parses these expressions as
> > child::INF etc.
> > > Clearly I have a problem with the interpretation of the grammar.
> > > --
> > > Colin Paul Adams
> > > Preston Lancashire
> >
> >
> >
> >
Received on Friday, 14 January 2005 11:40:00 UTC

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