- From: <bugzilla@wiggum.w3.org>
- Date: Fri, 20 Jan 2006 20:00:19 +0000
- To: public-qt-comments@w3.org
- Cc:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2735 Summary: Need for exact semantics in casting string to decimal Product: XPath / XQuery / XSLT Version: Candidate Recommendation Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Functions and Operators AssignedTo: ashok.malhotra@oracle.com ReportedBy: chamberl@almaden.ibm.com QAContact: public-qt-comments@w3.org The following change is requested in F&O Section 17.1.1, "Casting from xs:string and xdt:untypedAtomic", Paragraph 6: Old text: "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 Section 6.2, Operators on Numeric Values. Proposed new text: "In casting to xs:decimal, if the value cannot be accurately represented by the implementation, an error is raised [err:FOAR0002], In casting to numeric types other than xs:decimal, 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 Section 6.2, Operators on Numeric Values. Reason for change: These rules govern the interpretation of literals in queries. We believe that users have an expectation that decimal literals will be interpreted exactly and not rounded off. For example, if a user writes the decimal literal 1.00000...00001 which cannot be accurately represented by the implementation due to lack of precision, the implementation should alert the user by an error code rather than simply rounding the literal to 1.
Received on Friday, 20 January 2006 20:00:23 UTC