<?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>3529</bug_id>
          
          <creation_ts>2006-07-24 21:04:48 +0000</creation_ts>
          <short_desc>[F&amp;O] digits of precision returned by the numeric operators</short_desc>
          <delta_ts>2007-02-25 23:33:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Functions and Operators 1.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrew Eisenberg">andrew.eisenberg</reporter>
          <assigned_to name="Ashok Malhotra">ashok.malhotra</assigned_to>
          <cc>mike</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>10742</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2006-07-24 21:04:48 +0000</bug_when>
    <thetext>Section 6.2, Operators on Numeric Values, states in part:

&quot;For xs:decimal values the number of digits of precision returned by the numeric operators is ·implementation-defined·. If the number of digits in the result exceeds the number of digits that the implementation supports, the result is truncated or rounded in an ·implementation-defined· manner.&quot;

Consider the query &quot;1 div 3&quot;. Certainly a result of 0.333333333333333333 (18 digits) would be permitted. Would a value of 0.333333333333333 (15 digits) be permitted as well?

Michael Kay has argued:

&quot;The first sentence must be read in the context of the second, which creates a
relationship between the number of digits in the result of decimal division and
the number of digits supported by the xs:decimal data type. The latter must be
at least 18, and I believe that the result of division should therefore not
truncate or round unless it requires more than 18 digits.&quot;

This question is being raised based on several test cases, as reported on the XML Query Test Suite in [1] and [2].


[1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=3443
[2] http://www.w3.org/Bugs/Public/show_bug.cgi?id=3528</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10939</commentid>
    <comment_count>1</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-08-01 15:50:53 +0000</bug_when>
    <thetext>All:

This bug was closed with no further action as per the Working Group&apos;s decision on August 1, 2006.  15 digist will be acceptable for this type of this type
of operations.

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14116</commentid>
    <comment_count>2</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2007-02-25 23:33:18 +0000</bug_when>
    <thetext>Closing bug because commenter has not objected to the resolution posted and more than two weeks have passed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>