<?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>3847</bug_id>
          
          <creation_ts>2006-10-18 16:24:24 +0000</creation_ts>
          <short_desc>inconsistent definition of idiv</short_desc>
          <delta_ts>2007-10-02 22:55:08 +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>Formal Semantics 1.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.w3.org/TR/2006/CR-xquery-semantics-20060608/</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="Anthony Jones">anthony</reporter>
          <assigned_to name="Jerome Simeon">simeon</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>12528</commentid>
    <comment_count>0</comment_count>
    <who name="Anthony Jones">anthony</who>
    <bug_when>2006-10-18 16:24:24 +0000</bug_when>
    <thetext>Sections C.2 of Formal Semantics defines the argument types of idiv to be xs:integer. XPath CR and Functions and Operators CR both suggest that it should accept xs:numeric.

http://www.w3.org/TR/2006/CR-xpath-functions-20060608/#func-numeric-integer-divide
http://www.w3.org/TR/2006/CR-xpath20-20060608/#id-arithmetic</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13144</commentid>
    <comment_count>1</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2006-12-12 16:11:22 +0000</bug_when>
    <thetext>I think I agree with the comment. We should probably map idiv to div.
- Jerome</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13983</commentid>
    <comment_count>2</comment_count>
    <who name="Jerome Simeon">simeon</who>
    <bug_when>2007-02-14 02:33:11 +0000</bug_when>
    <thetext>Anthony,
The working groups reviewed your comment, and agreed with you.
The corresponding issue will be fixed in a future errata,
by adding support for the other numeric type, consistently
with the F&amp;O document.
Best,
- Jerome Simeon
On Behalf of the XML Query and XSLT Working Groups</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16999</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2007-10-02 22:55:08 +0000</bug_when>
    <thetext>This issue has been entered as FS erratum E016.

I have committed the following fix to the source files for the next edition of the FS document:

  In C.2 Mapping of Overloaded Internal Functions / Binary Operators table,
  for fs:idiv(A,B), replace:

    xs:integer  xs:integer  op:integer-div(A, B)             xs:integer

  with:

    xs:integer  xs:integer  op:numeric-integer-divide(A, B)  xs:integer
    xs:decimal  xs:decimal  op:numeric-integer-divide(A, B)  xs:integer
    xs:float    xs:float    op:numeric-integer-divide(A, B)  xs:integer
    xs:double   xs:double   op:numeric-integer-divide(A, B)  xs:integer

This issue has already been marked resolved-FIXED and CLOSED; please REOPEN it if you disagree with this resolution. </thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>