This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5229 - Definition of xs:double
Summary: Definition of xs:double
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: 1.0/1.1 both
Hardware: PC Windows XP
: P2 minor
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard: cluster: numbers
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2007-10-26 09:39 UTC by Michael Kay
Modified: 2008-02-29 20:30 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2007-10-26 09:39:48 UTC
Concerning xs:double in Part 2 section 3.3.6

The definition refers to "with the minor exception noted below". There are many notes below, and I can't actually tell which one this is referring to.

A more substantive criticism (which relates perhaps to bug #3243), is that we seem to have both an intensional definition [=IEEE 754] and an extensional definition [non-zero numbers  m × 2^e] of the value space and it's not clear which one wins.
Comment 1 Dave Peterson 2007-10-30 04:10:26 UTC
(In reply to comment #0)
> Concerning xs:double in Part 2 section 3.3.6
> 
> The definition refers to "with the minor exception noted below". There are many
> notes below, and I can't actually tell which one this is referring to.

As best I can tell, this phrase and the note to which it referred were both deleted, then the phrase was restored but the note was not.  I believe the only minor exception still existing is that we don't
distinguish between signalling and quiet nans, nor between all the various system-defined variant
NaNs.  In one sense, this doesn't *violate* 754, because IIRC it doesn't require those distinctions to be retained in lexical representations.
 
> A more substantive criticism (which relates perhaps to bug #3243), is that we
> seem to have both an intensional definition [=IEEE 754] and an extensional
> definition [non-zero numbers  m × 2^e] of the value space and it's not clear
> which one wins.

i'm not sure I see the relationship to bug 3243, but with the exception of the multiple NaNs, the value spaces from 754 and our spec are isomorphic--i.e., abstractly the same.  So it's a tie, except for NaN.  

BTW, this bug and my reply apply equally well to float as well as double.
Comment 2 C. M. Sperberg-McQueen 2008-02-27 01:29:12 UTC
Like Dave, I have reviewed the textual history of this passage without
finding much enlightenment.  As far as I can tell, the only exception
to which its plausible for the reference to be pointing to is the note,
in some earlier versions of the spec, that our float and double types
have a single NaN, whereas IEEE postulates a large class of NaNs which
are not identical but also not always meaningfully disgintuishable.
The reference, however, appears to have been introduced at the same time
the note aobut the NaNs was deleted.

Without deep confidence, therefore, I diagnose editorial error (adding
a pointer to the sentence about NaNs, then deleting that sentence
without deleting the pointer).  With slightly more confidence, I propose
a simple fix:  delete the phrase "with the minor exception noted below"
both from the description of float and from that of double.

On the intensional / extensional tension; the phrasing "The double 
datatype is the IEEE double-precision 64-bit floating point datatype"
is perhaps imperfect:  xsd:double clearly has properties specific to
XSD, and while there is not much doubt that IEEE can be described in terms
of a value space and a lexical space and mappings between them, it's also
clear that such a description is our work, not that of IEEE.

We might consider replacing "is" with a verb like "mirrors", if that 
helps.  But unless there is some more specific instance of an apparent
conflict between intension and extension, I propose to do nothing much about
the second observation in the bug report.

To summarize:  (1) delete "with the minor exception noted below" (twice),
and (2) optionally replace "is" with "mirror" (or another verb that
commands consensus in the WG).
Comment 3 C. M. Sperberg-McQueen 2008-02-27 15:26:16 UTC
A wording proposal intended to resolve this issue among others was sent to
the WG 27 February 2008:
http://www.w3.org/XML/Group/2004/06/xmlschema-2/datatypes.omni200802.xml
(member-only link).
Comment 4 C. M. Sperberg-McQueen 2008-02-29 19:40:20 UTC
At its telcon today, the XML Schema WG adopted the wording proposal at 
http://www.w3.org/XML/Group/2004/06/xmlschema-2/datatypes.omni200802.xml
(member-only link), and believes this issue now to be resolved.  

Since the originator is a WG member and was present on the call, it seems
likely that you agree that the issue is successfully resolved.  Still, 
please so indicate by changing the status of the bug report to CLOSED.
Or reopen it if you discover a snag.  Silence will be taken to mean consent.