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 5691 - K2-Literals-6 expected results
Summary: K2-Literals-6 expected results
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: 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-05-16 09:32 UTC by Ivan Shcheklein
Modified: 2008-05-20 11:13 UTC (History)
0 users

See Also:


Attachments

Description Ivan Shcheklein 2008-05-16 09:32:30 UTC
K2-Literals-6 result depends on impelemntation defined rounding algorithm.

It seems it should be based on the following rule (F&O 17.1.1):

"In casting to xs:decimal or to a type derived from xs:decimal, if the value is not too large or too small but nevertheless cannot be represented accurately with the number of decimal digits available to the implementation, the implementation may round to the nearest representable value or may raise a dynamic error [err:FOCA0006]. The choice of rounding algorithm and the choice between rounding and error behavior and is implementation-defined."

but not on 

"In casting to numerics, if the value is too large or too small to be accurately represented by the implementation, it is handled as an overflow or underflow as defined in 6.2 Operators on Numeric Values."

like in K2-Literals-4,5.
Comment 1 Frans Englich 2008-05-20 09:42:58 UTC
The query reads:

(:*******************************************************:)
(: Test: K2-Literals-6                                   :)
(: Written by: Frans Englich                             :)
(: Date: 2007-11-22T11:31:21+01:00                       :)
(: Purpose: Use a relatively large xs:decimal literal.   :)
(:*******************************************************:)
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.1


The expected results is FOAR0002 and:

999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.1

For the baseline, it to me seems no rounding has been done.

Do you suggest that:

* FOAR0002 is replaced with FOCA0006
* An additional numeric baseline is added with the number that your implementation in question produce. An alternative to this is to accept any output, but that's preferably avoided.
Comment 2 Ivan Shcheklein 2008-05-20 10:08:12 UTC
It enough for me to add the following value:

1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

However, FOCA0006 is better here also I suppose.

Comment 3 Frans Englich 2008-05-20 11:11:03 UTC
Should be fixes in CVS. Added the suggested baseline, and changed to error code FOCA0006.

Feel free to change status to CLOSED if the resolution is satisfactory.
Comment 4 Ivan Shcheklein 2008-05-20 11:13:01 UTC
Ok. Thanks.