"Infinity" is incorrectly cast to xs:float.
Saturday, 23 June 2018 · 2 messages · last reply 28 Jun 2018
RD
Reece Dunn23 Jun 2018 15:52 #
Hi,
I have found the following behaviour in BaseX 9.0:
"Infinity" cast as xs:float (: INF :)
"-Infinity" cast as xs:float (: -INF :)
"infinity" cast as xs:float (: [FORG0001] Cannot convert xs:string to xs:float: "infinity". :)
"Infinity" cast as xs:double (: [FORG0001] Cannot convert xs:string to xs:double: "Infinity". :)
"-Infinity" cast as xs:double (: [FORG0001] Cannot convert xs:string to xs:double: "-Infinity". :)
From my reading of Functions and Operators 3.1, and XML Schema 1.1 Part 2 Datatypes, "Infinity" and "-Infinity" are both invalid values for xs:float (like with xs:double) -- they should only be "INF" and "-INF".
Kind regards,
Reece H. Dunn
CG
Christian Grün28 Jun 2018 17:03 #
Dear Reece,
Thanks for the hint. An updated snapshot will be available tomorrow [1].
Best,
Christian
[1] http://files.basex.org/releases/latest/
Quoted text · Reece Dunn · 16 lines
On Sat, Jun 23, 2018 at 3:53 PM Reece Dunn <msclrhd at googlemail.com> wrote: > > Hi, > > I have found the following behaviour in BaseX 9.0: > > "Infinity" cast as xs:float (: INF :) > "-Infinity" cast as xs:float (: -INF :) > "infinity" cast as xs:float (: [FORG0001] Cannot convert xs:string to xs:float: "infinity". :) > "Infinity" cast as xs:double (: [FORG0001] Cannot convert xs:string to xs:double: "Infinity". :) > "-Infinity" cast as xs:double (: [FORG0001] Cannot convert xs:string to xs:double: "-Infinity". :) > > From my reading of Functions and Operators 3.1, and XML Schema 1.1 Part 2 Datatypes, "Infinity" and "-Infinity" are both invalid values for xs:float (like with xs:double) -- they should only be "INF" and "-INF". > > Kind regards, > Reece H. Dunn
Written for BaseX 9.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery