1------------------------------------------------------------------------
2-- ddPlus.decTest -- decDouble 0+x                                    --
3-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
4------------------------------------------------------------------------
5-- Please see the document "General Decimal Arithmetic Testcases"     --
6-- at http://www2.hursley.ibm.com/decimal for the description of      --
7-- these testcases.                                                   --
8--                                                                    --
9-- These testcases are experimental ('beta' versions), and they       --
10-- may contain errors.  They are offered on an as-is basis.  In       --
11-- particular, achieving the same results as the tests here is not    --
12-- a guarantee that an implementation complies with any Standard      --
13-- or specification.  The tests are not exhaustive.                   --
14--                                                                    --
15-- Please send comments, suggestions, and corrections to the author:  --
16--   Mike Cowlishaw, IBM Fellow                                       --
17--   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
18--   mfc@uk.ibm.com                                                   --
19------------------------------------------------------------------------
20version: 2.59
21
22-- All operands and results are decDoubles.
23precision:   16
24maxExponent: 384
25minExponent: -383
26extended:    1
27clamp:       1
28rounding:    half_even
29
30-- Sanity check
31ddpls001 plus       +7.50  -> 7.50
32
33-- Infinities
34ddpls011 plus  Infinity    -> Infinity
35ddpls012 plus  -Infinity   -> -Infinity
36
37-- NaNs, 0 payload
38ddpls021 plus         NaN  -> NaN
39ddpls022 plus        -NaN  -> -NaN
40ddpls023 plus        sNaN  -> NaN  Invalid_operation
41ddpls024 plus       -sNaN  -> -NaN Invalid_operation
42
43-- NaNs, non-0 payload
44ddpls031 plus       NaN13  -> NaN13
45ddpls032 plus      -NaN13  -> -NaN13
46ddpls033 plus      sNaN13  -> NaN13   Invalid_operation
47ddpls034 plus     -sNaN13  -> -NaN13  Invalid_operation
48ddpls035 plus       NaN70  -> NaN70
49ddpls036 plus      -NaN70  -> -NaN70
50ddpls037 plus      sNaN101 -> NaN101  Invalid_operation
51ddpls038 plus     -sNaN101 -> -NaN101 Invalid_operation
52
53-- finites
54ddpls101 plus          7   -> 7
55ddpls102 plus         -7   -> -7
56ddpls103 plus         75   -> 75
57ddpls104 plus        -75   -> -75
58ddpls105 plus       7.50   -> 7.50
59ddpls106 plus      -7.50   -> -7.50
60ddpls107 plus       7.500  -> 7.500
61ddpls108 plus      -7.500  -> -7.500
62
63-- zeros
64ddpls111 plus          0   -> 0
65ddpls112 plus         -0   -> 0
66ddpls113 plus       0E+4   -> 0E+4
67ddpls114 plus      -0E+4   -> 0E+4
68ddpls115 plus     0.0000   -> 0.0000
69ddpls116 plus    -0.0000   -> 0.0000
70ddpls117 plus      0E-141  -> 0E-141
71ddpls118 plus     -0E-141  -> 0E-141
72
73-- full coefficients, alternating bits
74ddpls121 plus  2682682682682682         -> 2682682682682682
75ddpls122 plus  -2682682682682682        -> -2682682682682682
76ddpls123 plus  1341341341341341         -> 1341341341341341
77ddpls124 plus  -1341341341341341        -> -1341341341341341
78
79-- Nmax, Nmin, Ntiny
80ddpls131 plus  9.999999999999999E+384   -> 9.999999999999999E+384
81ddpls132 plus  1E-383                   -> 1E-383
82ddpls133 plus  1.000000000000000E-383   -> 1.000000000000000E-383
83ddpls134 plus  1E-398                   -> 1E-398 Subnormal
84
85ddpls135 plus  -1E-398                  -> -1E-398 Subnormal
86ddpls136 plus  -1.000000000000000E-383  -> -1.000000000000000E-383
87ddpls137 plus  -1E-383                  -> -1E-383
88ddpls138 plus  -9.999999999999999E+384  -> -9.999999999999999E+384
89