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 25084 - cbcl-avg-010 can return NaN
Summary: cbcl-avg-010 can return NaN
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Last Call drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-17 18:16 UTC by Michael Kay
Modified: 2015-01-03 17:22 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2014-03-17 18:16:23 UTC
Tes cbcl-avg-010 is:

avg((xs:double("NaN"), current-date() - xs:date("1997-01-01") ))

I believe that under "Errors and Optimization", NaN is a legitimate result. Once an xs:double NaN value has been found in the input sequence, the only possible outcomes are NaN or an error, so the processor is entitled to take an early bath and return NaN.
Comment 1 Tim Mills 2014-09-24 11:04:54 UTC
Agreed.
Comment 2 Michael Kay 2015-01-03 17:22:31 UTC
Fixed as suggested.