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 2780 - F&O allows several options for float, double overflow & underflow behavior, XQTS allows only one
Summary: F&O allows several options for float, double overflow & underflow behavior, X...
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.8.4
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Carmelo Montanez
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-30 18:30 UTC by Naresh Chainani
Modified: 2006-06-22 13:00 UTC (History)
0 users

See Also:


Attachments

Description Naresh Chainani 2006-01-30 18:30:44 UTC
According to section 6.2 of F&O (http://www.w3.org/TR/xquery-
operators/#op.numeric), implementations have several options for handling 
overflow for operations on xs:float and xs:double:
a) Raise err:FOAR0002
b) Return INF or -INF
c) Return the largest (pos or neg) finite number

Similar options apply to underflow behavior.

The following XQTS tests should allow multiple expected results:
fn-avgflt2args-1
fn-sumdbl3args-1
fn-sumdbl3args-1
fn-sumflt3args-1
fn-sumflt3args-6
CastAs169
CastAs204
Comment 1 Naresh Chainani 2006-01-30 21:55:55 UTC
More tests failing due to same reason:
CastAs[182-198]
Comment 2 Carmelo Montanez 2006-02-06 20:07:39 UTC
Naresh:

Does your implementation raises an error?

Thanks,
Carmelo
Comment 3 Carmelo Montanez 2006-02-06 20:29:23 UTC
Naresh:

I added the extra error code for the cases were there is a potential
for overflow/underflow.  Note a few things:

1) You listed "fn-sumdbl3args-1" twice.  You meant a different test?
2) "CastAs192" and "CastAs193" does not seems to create an overflow
situation.  Can you double check those?

Thanks,
Carmelo
Comment 4 Naresh Chainani 2006-02-06 21:35:00 UTC
(In reply to comment #2 and #3)

> 0) Does your implementation raises an error?

Yes, err:FOAR0002 is raised in my implementation.

> 1) You listed "fn-sumdbl3args-1" twice.  You meant a different test?

Yes, thanks for catching! I meant fn-sumdbl3args-6

> 2) "CastAs192" and "CastAs193" does not seems to create an overflow
> situation.  Can you double check those?

You are correct. The relevant overflow/underflow tests are CastAs[182-191] and 
CastAs[196-198].

Thanks Carmelo!
Comment 5 Carmelo Montanez 2006-02-06 21:42:25 UTC
Naresh:

I made all the relevant changes.  Please close bug if in agreement and 
when able to verify.

Thanks,
Carmelo