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 2993 - Alternative result for fn-avg-mix-args-047
Summary: Alternative result for fn-avg-mix-args-047
Status: RESOLVED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.8.6
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Ravindranath (Ravi) Chennoju
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-08 16:25 UTC by Michael Kay
Modified: 2006-04-13 22:25 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2006-03-08 16:25:21 UTC
The text of this query is

fn:avg(( (xs:float("NaN"), xs:decimal("-999999999999999999") , "a", (), "3") ))

I believe that this can validly return "NaN", under the criteria for "errors and optimization": once you've established that there is only one possible non-error result (NaN in this case) you are allowed to exit early and return that result without evaluating more of the sequence to look for errors.
Comment 1 Michael Kay 2006-03-08 16:27:12 UTC
Also applies to fn-avg-mix-args-056
Comment 2 Ravindranath (Ravi) Chennoju 2006-04-13 22:25:06 UTC
Added additional output for fn-avg-mixed-args-047 and 056 with expected output as "NaN"