<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>4881</bug_id>
          
          <creation_ts>2007-07-25 13:32:39 +0000</creation_ts>
          <short_desc>Should -NaN be allowed and given a meaning?</short_desc>
          <delta_ts>2008-05-16 17:15:53 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema</product>
          <component>Datatypes: XSD Part 2</component>
          <version>1.1 only</version>
          <rep_platform>Macintosh</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>cluster: numbers</status_whiteboard>
          <keywords>resolved</keywords>
          <priority>P4</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="C. M. Sperberg-McQueen">cmsmcq</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          
          
          <qa_contact name="XML Schema comments list">www-xml-schema-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>15914</commentid>
    <comment_count>0</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2007-07-25 13:32:39 +0000</bug_when>
    <thetext>In his survey of the impact of precision decimal on XPath and XQuery
(http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2006May/0023.html)
[member-only link], Don Chamberlin observes

    In 754r Section 5.10 we read &quot;totalorder(-NaN, number) is 
    true where -NaN represents a NaN with negative sign bit&quot;. 
    (But there is no negative NaN value in XML Schema.)

It would appear from this that IEEE 754R assigns distinct meaning,
for ordering purposes, to the sign bit of NaN values.  Our
description of precisionDecimal requires the sign to be absent
when the numericalValue is notANumber.  Our float and double
types have a NaN, but no negative NaN.

If IEEE 754 does assign ordering or processing semantics to 
-NaN, it may perhaps be useful for XPath and the other QT
specs if XSDL distinguishes NaN and -NaN.

Should our description of NaN be modified to follow 754?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16059</commentid>
    <comment_count>1</comment_count>
    <who name="Dave Peterson">davep</who>
    <bug_when>2007-08-06 03:33:20 +0000</bug_when>
    <thetext>(In reply to comment #0)

&gt;     In 754r Section 5.10 we read &quot;totalorder(-NaN, number) is 
&gt;     true where -NaN represents a NaN with negative sign bit&quot;. 
&gt;     (But there is no negative NaN value in XML Schema.)
&gt; 
&gt; It would appear from this that IEEE 754R assigns distinct meaning,
&gt; for ordering purposes, to the sign bit of NaN values.  Our
&gt; description of precisionDecimal requires the sign to be absent
&gt; when the numericalValue is notANumber.  Our float and double
&gt; types have a NaN, but no negative NaN.
&gt; 
&gt; If IEEE 754 does assign ordering or processing semantics to 
&gt; -NaN, it may perhaps be useful for XPath and the other QT
&gt; specs if XSDL distinguishes NaN and -NaN.

It&apos;s true that 754R provides for this alternate total ordering (which differs from the usual not-quite-total ordering, also provided for).  However, 754R in 7.12.1 prescribes that &quot;quiet&quot; NaNs are to be represented lexically as &quot;nan&quot; or some partially or entirely capitalized variant, and that &quot;signaling&quot; NaNs are to be similarly represented by &quot;snan&quot; or &quot;nan&quot;.  In either case, no sign is allowed.  If we wish to cover the case of the sign bit of NaNs in out lexical representations, according to 8.2.1 we must in addition to &quot;nan&quot; (or the optional &quot;snan&quot;) provide a bit patern that sets out all of the system-defined-meaning bits that can vary in the various NaNs.  The WG considered and rejected long ago the option (IIRC, WRT float and double) of specifying such bit patterns.  Need we reopen that question?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16071</commentid>
    <comment_count>2</comment_count>
    <who name="Dave Peterson">davep</who>
    <bug_when>2007-08-07 02:41:14 +0000</bug_when>
    <thetext>(In reply to comment #1)

&gt; allowed.  If we wish to cover the case of the sign bit of NaNs in out lexical
&gt; representations, 
s/in out/in our/

Sorry.  :-(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18111</commentid>
    <comment_count>3</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2007-12-17 15:59:10 +0000</bug_when>
    <thetext>The editors discussed this on the editors&apos; call this morning.  Comment #1 
may be in error in saying the lexical form &apos;-NaN&apos; is not allowed (section 
5.12.1 appears to allow it, but explicitly says that it has no meaning).

Section 6.3 says that IEEE 754R (draft 1.5.0, October 2007) does not 
interpret the sign bit of NaNs.

The editors recommend to the WG that this issue be closed without change, as
WORKSFORME.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20146</commentid>
    <comment_count>4</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2008-05-16 17:15:40 +0000</bug_when>
    <thetext>At the telcon of 16 May 2008, the XML Schema WG adopted the proposal
in comment #3 to close this issue as WORKSFORME.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>