This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The following tests have expected results that are sensitive to float/double to string conversion. Other results are permissible in these cases: casthc14, 23 casthcds2, 8, 9, 14, 23 vardeclwithtype-6 fn-numberintg1args-2 fn-numberdec1args-2 fn-numberflt1args-1, 3 fn-numberlng1args-2 fn-numbernint1args-2 fn-numberpint1args-2 fn-numberulng1args-2, 3 fn-numbernpi1args-2 fn-numbernni1args-2 fn-avgdbl2args-1, 2 These are the tests where Saxon results revealed the problem: there may of course be many other tests where Saxon produced the reference result but other results would be equally acceptable. Suggested resolution: in many of these tests the query produces a single float/double as the result. In these cases replace the current query expression EXPR by EXPR eq EXPECTED where EXPECTED is the expected result. (This also has the advantage that a single "expected results" file containing the value "true" can be used repeatedly). Michael Kay
In 0.8.6 this problem also affects: fn-avg-mix-args-013, -015 extvardeclwithouttype-6 vardeclwithtype-6 schema-import-5 schema-import-6 schema-import-7 schema-import-9 schema-import-10 schema-import-11 schema-import-13 schema-import-14 schema-import-15 schema-import-17 schema-import-18 schema-import-19 schema-import-25 schema-import-26 schema-import-27
Michael: Thanks for the comment and the suggestion. Other than 5 cases, for which the "eq" comparisson would not work due to some casting issues (in which case two outcomes were possible), I followed your suggestion of EXPR eq EXPECTED. Please close the bug if this is satisfactory to you. Thanks, Carmelo
I would like to reopen this one again. Has the approach Michael Kay is proposing, EXPR eq EXPECTED, been implemented in XQTS 0.9.0? We have still issues with the following tests: extvardeclwithtype-6 extvardeclwithouttype-6 vardeclwithtype-6 fn-numberflt1args-1 fn-numberflt1args-3 fn-numberlng1args-2 fn-numbernpi1args-2 fn-numberulng1args-3 fn-avgdbl2args-2 fn-avgdbl2args-4 If we take a closer look at fn-numberflt1args-1 for example XQTS has the following expected results: -3.402823466385289E38 -3.4028234663852885E38 But in one of our configurations we return -3.4028234663852886E38 Thanks, Marc
Marc: It looks as though plan proposed by Michael Kay will not work on every single case. I will look at your list of tests and address each one individually. Thanks, Carmelo
Marc: I looked at each of the tests. I have some observartions: extvardeclwithtype-6, extvardeclwithouttype-6, vardeclwithtype-6 - For somre reason (perhaps implementation internals), the scheme does not works. I will be more than happy to add your return value to the list of expected outcomes. This is permissible under the guidelines. fn-numberflt1args-1 - Changed test to use Michael suggested scheme. Used number with higher precision for comparison. fn-numberflt1args-3 - Suggested scheme seems not to work. I will be happy to add your expected outcome to the list. This is permissible under the guidelines. fn-numberlng1args-2 - Already uses Michael suggested scheme. fn-numbernpi1args-2 - Changed the test to use Michael suggested scheme. fn-numberulng1args-3 - Already uses Michael suggested scheme. fn-avgdbl2args-2 - Already uses, Michael suggested scheme. fn-avgdbl2args-4 - Changed test to use Michael's suggested scheme. Thanks, Carmelo
Marc: Do you have any feedback based on my last comment? Thansk, Carmelo
In schema-import-5, the comparison does not work because it is comparing a float to a double, which involves a conversion. If the test is changed from fn:avg(($input-context1//atomic:float,$input-context1//atomic:float))) eq 1.26743233E15 to fn:avg(($input-context1//atomic:float,$input-context1//atomic:float))) eq xs:float(1.26743233E15) then it is legitimate to expect the answer "true". Similary schema-import-9 should be: (fn:abs($input-context1//atomic:float)) eq xs:float(1.26743233E15) schema-import-13 should be: (fn:max(($input-context1//atomic:float,$input-context1//atomic:float))) eq xs:float(1.26743233E15) schema-import-17 should be: (fn:min(($input-context1//atomic:float,$input-context1//atomic:float))) eq xs:float(1.26743233E15) schema-import-25 should be: (($input-context1//atomic:float) + ($input-context1//atomic:float)) eq xs:float(2.53486466E15)
Michael/Mark et all: All outstanding issues from these tests were addressed by either using Michael changes or adding alternate outcome. Thanks, Carmelo