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.