- From: Michael Kay <mike@saxonica.com>
- Date: Fri, 15 Apr 2016 19:11:49 +0100
- To: Public Joint XSLT XQuery XPath <public-xsl-query@w3.org>
- Message-Id: <8BFDCDC9-D4A8-4E6E-B66A-BD0090BEAB3D@saxonica.com>
To implement the WGs decision on this I am proposing, unless anyone objects, to rewrite the paragraph on xs:decimal precision as follows: <p>For <code>xs:decimal</code> values<phrase diff="add" at="D">, let <var>N</var> be the number of digits of precision supported by the implementation, and let <var>M</var> (<code>M <= N</code>) be the minimum limit on the number of digits required for conformance (18 digits for XSD 1.0, 16 digits for XSD 1.1)</phrase>. Then for addition, subtraction, and multiplication operations, the returned result <rfc2119>should</rfc2119> be accurate to <var>N</var> digits of precision, and for division and modulus operations, the returned result <rfc2119>should</rfc2119> be accurate to at least <var>M</var> digits of precision. The actual precision is <termref def="implementation-defined"/>. If the number of digits in the mathematical result exceeds the number of digits that the implementation retains for that operation, the result is truncated or rounded in an <termref def="implementation-defined"/> manner.</p> <note><p diff="add" at="D">This Recommendation does not specify whether <code>xs:decimal</code> operations are fixed point or floating point. In an implementation using floating point it is possible for very simple operations to require more digits of precision than are available; for example adding <code>1e100</code> to <code>1e-100</code> requires 200 digits of precision for an accurate representation of the result.</p></note> Michael Kay Saxonica
Received on Friday, 15 April 2016 18:12:30 UTC