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 3847 - inconsistent definition of idiv
Summary: inconsistent definition of idiv
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Jerome Simeon
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL: http://www.w3.org/TR/2006/CR-xquery-s...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-18 16:24 UTC by Anthony Jones
Modified: 2007-10-02 22:55 UTC (History)
0 users

See Also:


Attachments

Description Anthony Jones 2006-10-18 16:24:24 UTC
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
Comment 1 Jerome Simeon 2006-12-12 16:11:22 UTC
I think I agree with the comment. We should probably map idiv to div.
- Jerome
Comment 2 Jerome Simeon 2007-02-14 02:33:11 UTC
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&O document.
Best,
- Jerome Simeon
On Behalf of the XML Query and XSLT Working Groups
Comment 3 Michael Dyck 2007-10-02 22:55:08 UTC
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.