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 29400 - [QT3] fn-avgflt2args-1 result type
Summary: [QT3] fn-avgflt2args-1 result type
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Candidate Recommendation
Hardware: PC Linux
: 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: 2016-01-28 23:06 UTC by Benito van der Zander
Modified: 2016-02-01 11:36 UTC (History)
2 users (show)

See Also:


Attachments

Description Benito van der Zander 2016-01-28 23:06:13 UTC
The assertions for the test fn:avg((xs:float("-3.4028235E38"),xs:float("-3.4028235E38"))) accept the value -3.4028235E38 as valid.

However, -3.4028235E38 is an xs:double and thus not equal to xs:float("-3.4028235E38"). Even casting the input sequence to double would not return xs:double("-3.4028235E38"), but xs:double(xs:float("-3.4028235E38")) which is xs:double("-3.4028234663852885E38")

So it should allow xs:float("-3.4028235E38") instead, and perhaps not allow -3.4028235E38
Comment 1 Abel Braaksma 2016-01-30 03:27:47 UTC
I think you are right, the return type must be xs:float here. Since -3.4028235E38 ne xs:double('-3.4028235E38'), the test result should probably have the expression xs:float("-3.4028235E38") instead.
Comment 2 Abel Braaksma 2016-01-30 03:28:17 UTC
> -3.4028235E38 ne xs:double('-3.4028235E38')
Oops, that should have read: -3.4028235E38 ne xs:float('-3.4028235E38')
Comment 3 O'Neil Delpratt 2016-02-01 11:36:38 UTC
I also think you are right. I have made the change as suggested and committed it to cvs.