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

[Bug 1277] New: clarification about semantics of +0.0 and -0.0 in http://www.w3.org/TR/xquery-operators/

From: <bugzilla@wiggum.w3.org>
Date: Thu, 28 Apr 2005 22:10:14 +0000
To: public-qt-comments@w3.org
Message-Id: <E1DRHD4-0000HA-NO@wiggum.w3.org>


           Summary: clarification about semantics of +0.0 and -0.0 in
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P4
         Component: XPath
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: jameisonb@yahoo.com
         QAContact: public-qt-comments@w3.org

http://www.w3.org/TR/xquery-operators/ says that it has IEEE float/double
semantics as opposed to xml schema.  i'm not clear on what the
ordering/collation is of xs:float(0.0) and xs:float(-0.0) and how min()/max()
treat xs:float(0.0) and xs:float(-0.0) (not sure based on the doc and not sure
if this is specified in IEEE - there is no link to the IEEE standard provided).
given that negative zero and positive zero seem to designate different numbers,
one would expect that min({xs:float(0.0), xs:float(-0.0)}) => -0.0, but this
doesn't appear to have been stated and thus one could argue that because
xs:float(0.0) eq xs:float(-0.0), it is perfectly valid for min({xs:float(0.0),
xs:float(-0.0)}) to return either -0.0 or 0.0 (or worse still, just return one
or the other arbitrarily, as a typical impl will do by taking the first and
comparing it with the others).

it seems like sorting and min()/max() should be explicitly specified or
clarified to remove any ambiguity.
Received on Thursday, 28 April 2005 22:10:17 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:23 UTC