W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2005

[Bug 1917] New: RQ-140: distinguish negative from positive zero in float and double

From: <bugzilla@wiggum.w3.org>
Date: Tue, 30 Aug 2005 18:22:22 +0000
To: www-xml-schema-comments@w3.org
Cc:
Message-Id: <E1EAAkY-0001Gu-U8@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1917

           Summary: RQ-140:  distinguish negative from positive zero in
                    float and double
           Product: XML Schema
           Version: 1.1
          Platform: PC
               URL: http://www.w3.org/TR/xmlschema11-1/reqs.html#negative-
                    positive-zero
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSD Part 2: Datatypes
        AssignedTo: cmsmcq@w3.org
        ReportedBy: cmsmcq@w3.org
         QAContact: www-xml-schema-comments@w3.org


The value space of float and double should be aligned with
IEEE and with the XML Query, XPath, and XSLT specifications
and should have two distinct signed zeroes.  

Historical background:  the first edition of XML Schema 1.0
had two distinct zeroes, but there was pushback over the
consequence that for purposes of checking minimum and
maximum values on bounded types +0 was greater than -0.
To respond to these concerns, the WG issued an erratum 
which made them a single value.  This in turn distressed some
observers who felt that alignment with IEEE and QT required
distinct signed zeroes.  Eventually, the WG concluded that the
correct approach is to have distinct values, but make 
bounds checking depend not solely on identity but instead
on numeric equality:  positive and negative zeroes are to
be distinct values which compare equal in bounds checking.
Since this is the behavior of conforming IEEE arithmetic
libraries, it should be unsurprising to most people, although
some observers have already deplored the distinction thus
made between identity and (numeric) equality.
Received on Tuesday, 30 August 2005 18:22:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:09 GMT