<?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>5691</bug_id>
          
          <creation_ts>2008-05-16 09:32:30 +0000</creation_ts>
          <short_desc>K2-Literals-6 expected results</short_desc>
          <delta_ts>2008-05-20 11:13:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</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="Ivan Shcheklein">vano_msu</reporter>
          <assigned_to name="Frans Englich">frans.englich</assigned_to>
          
          
          <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>20135</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Shcheklein">vano_msu</who>
    <bug_when>2008-05-16 09:32:30 +0000</bug_when>
    <thetext>K2-Literals-6 result depends on impelemntation defined rounding algorithm.

It seems it should be based on the following rule (F&amp;O 17.1.1):

&quot;In casting to xs:decimal or to a type derived from xs:decimal, if the value is not too large or too small but nevertheless cannot be represented accurately with the number of decimal digits available to the implementation, the implementation may round to the nearest representable value or may raise a dynamic error [err:FOCA0006]. The choice of rounding algorithm and the choice between rounding and error behavior and is implementation-defined.&quot;

but not on 

&quot;In casting to numerics, if the value is too large or too small to be accurately represented by the implementation, it is handled as an overflow or underflow as defined in 6.2 Operators on Numeric Values.&quot;

like in K2-Literals-4,5.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20159</commentid>
    <comment_count>1</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-05-20 09:42:58 +0000</bug_when>
    <thetext>The query reads:

(:*******************************************************:)
(: Test: K2-Literals-6                                   :)
(: Written by: Frans Englich                             :)
(: Date: 2007-11-22T11:31:21+01:00                       :)
(: Purpose: Use a relatively large xs:decimal literal.   :)
(:*******************************************************:)
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.1


The expected results is FOAR0002 and:

999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.1

For the baseline, it to me seems no rounding has been done.

Do you suggest that:

* FOAR0002 is replaced with FOCA0006
* An additional numeric baseline is added with the number that your implementation in question produce. An alternative to this is to accept any output, but that&apos;s preferably avoided.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20160</commentid>
    <comment_count>2</comment_count>
    <who name="Ivan Shcheklein">vano_msu</who>
    <bug_when>2008-05-20 10:08:12 +0000</bug_when>
    <thetext>It enough for me to add the following value:

1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

However, FOCA0006 is better here also I suppose.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20167</commentid>
    <comment_count>3</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-05-20 11:11:03 +0000</bug_when>
    <thetext>Should be fixes in CVS. Added the suggested baseline, and changed to error code FOCA0006.

Feel free to change status to CLOSED if the resolution is satisfactory.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20168</commentid>
    <comment_count>4</comment_count>
    <who name="Ivan Shcheklein">vano_msu</who>
    <bug_when>2008-05-20 11:13:01 +0000</bug_when>
    <thetext>Ok. Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>