This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Section 6.2, Operators on Numeric Values, states in part: "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." Consider the query "1 div 3". 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: "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." 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
All: This bug was closed with no further action as per the Working Group's decision on August 1, 2006. 15 digist will be acceptable for this type of this type of operations. Thanks, Carmelo
Closing bug because commenter has not objected to the resolution posted and more than two weeks have passed.