[Bug 5183] [FO] Effect of type promotion in fn:distinct-values

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5183

           Summary: [FO] Effect of type promotion in fn:distinct-values
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
               URL: http://www.w3.org/TR/xpath-functions/#func-distinct-
                    values
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Functions and Operators
        AssignedTo: mike@saxonica.com
        ReportedBy: zongaro@ca.ibm.com
         QAContact: public-qt-comments@w3.org


Consider the following expression.  The values of type xs:float and xs:double
both compare equal to the value of type xs:decimal, due to the loss of
precision in type promotion, but the float and double values are not equal to
one another.  What is the correct result?  Or is it implementation-dependent
whether the result is 1 or 2?

count(distinct-values(
         (xs:float('1.0'),
          xs:decimal('1.0000000000100000000001',
          xs:double( '1.00000000001')))


See also the related XSLT 2.0 bug 2916.[1]

[1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=2916

Received on Friday, 12 October 2007 17:25:35 UTC