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 4585 - outcome of test-cases with high precision decimal literals implementation-defined
Summary: outcome of test-cases with high precision decimal literals implementation-def...
Status: RESOLVED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 1.0.2
Hardware: PC All
: P2 trivial
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: 2007-05-26 10:35 UTC by Tobias
Modified: 2007-09-12 14:54 UTC (History)
0 users

See Also:


Attachments

Description Tobias 2007-05-26 10:35:46 UTC
The following test-cases use decimal literals of a precision higher than 18 totalDigits (minimum requirement):

op-logical-and-066
op-logical-and-068
op-logical-or-066
op-logical-or-068

err:FOCA0006 should be added to the possible outcome of the test-cases or literals of lower precision should be used, because casting to xs:decimal is implementation-defined if the value cannot be represented accurately with the number of decimal digits available to the implementation:

FO § 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.

XQ § 3.1.1 Literals:
The value of a numeric literal containing an e or E character is an atomic value of type xs:double.
The value of the numeric literal is determined by casting it to the appropriate type according to the rules for casting from xs:untypedAtomic to a numeric type as specified in Section 17.1.1 Casting from xs:string and xs:untypedAtomic [FO].
Comment 1 Frans Englich 2007-09-12 14:54:12 UTC
A fix has been attempted in CVS, XQTS_current.zip is updated.

If the resolution is satisfactory, feel free to change status to CLOSED,
otherwise reopen this report. If no feedback is returned within two weeks, this report will automatically be closed. Thanks for reporting!