- From: <bugzilla@wiggum.w3.org>
- Date: Tue, 16 Jan 2007 10:02:27 +0000
- To: public-qt-comments@w3.org
- CC:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=4231
Summary: K2-Literals-7
Product: XML Query Test Suite
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: XML Query Test Suite
AssignedTo: andrew.eisenberg@us.ibm.com
ReportedBy: tim@cbcl.co.uk
QAContact: public-qt-comments@w3.org
This test aims to catch underflow in xs:decimal with an expected result of 0.0.
Underflow is defined in:
http://www2.hursley.ibm.com/decimal/daexcep.html
as:
"This occurs and signals underflow if a result is inexact and the adjusted
exponent of the result would be smaller (more negative) than the smallest value
that can be handled by the implementation (the value Emin). That is, the result
is both inexact and subnormal."
If I understand this correctly, underflow will occur for numbers very close to
zero, not numbers which are large negative values.
Therefore a suitable number for this test might be:
0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
Note also that due to the EBNF for decimal literals:
142] DecimalLiteral ::= ("." Digits) | (Digits "." [0-9]*)
this parses as:
-(9999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999999999999999999999999999999.1)
i.e. operator unary minus applied to a large (possibly overflowing) decimal.
(:*******************************************************:)
(: Test: K2-Literals-7 :)
(: Written by: Frans Englich :)
(: Date: 2007-01-12T16:19:57+01:00 :)
(: Purpose: Use a relatively small xs:decimal literal. :)
(:*******************************************************:)
-9999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999999999999999999999999999999.1
Received on Tuesday, 16 January 2007 10:02:38 UTC