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 5816 - [XQTS] round-half-to-even tests can overflow
Summary: [XQTS] round-half-to-even tests can overflow
Status: RESOLVED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Frans Englich
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-27 14:47 UTC by Oliver Hallam
Modified: 2008-06-27 16:27 UTC (History)
1 user (show)

See Also:


Attachments

Description Oliver Hallam 2008-06-27 14:47:00 UTC
The specification of round-half-to-even says the following [F&O 6.4.5]:

For arguments of type xs:float and xs:double, if the argument is NaN, positive or negative zero, or positive or negative infinity, then the result is the same as the argument. In all other cases, the argument is cast to xs:decimal, the function is applied to this xs:decimal value, and the resulting xs:decimal is cast back to xs:float or xs:double as appropriate to form the function result.

However a number of xqts tests contain large float/double values that can easily overflow the implementation-defined limit for the size of a decimal, hence FOCA0001 overflow errors are also acceptable outcomes for these test cases.

We are experiencing this problem with the following test cases:
fn-round-half-to-evendbl1args-1
fn-round-half-to-evendbl1args-3
fn-round-half-to-evenflt1args-1
fn-round-half-to-evenflt1args-3
K2-RoundEvenFunc-11
K2-RoundEvenFunc-12
K2-RoundEvenFunc-13
K2-RoundEvenFunc-14
K2-RoundEvenFunc-15
K2-RoundEvenFunc-16
Comment 1 Frans Englich 2008-06-27 15:28:02 UTC
I've added FOCA0001 to:

fn-round-half-to-evendbl1args-1
fn-round-half-to-evendbl1args-3
fn-round-half-to-evenflt1args-1
fn-round-half-to-evenflt1args-3

However, K2-RoundEvenFunc-11 to 16 involves fn:rount-half-to-even invoked with INF, -INF or NaN, on the type xs:double or xs:float. For these values I believe no casting is being performed, "the result is the same as the argument." Or in what way shall one view them?
Comment 2 Oliver Hallam 2008-06-27 16:27:38 UTC
I agree with you with regards to K2-RoundEvenFunc-11 to 16, and so have marked it FIXED.