1------------------------------------------------------------------------
2-- dqPlus.decTest -- decQuad 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 decQuads.
23extended:    1
24clamp:       1
25precision:   34
26maxExponent: 6144
27minExponent: -6143
28rounding:    half_even
29
30-- Sanity check
31dqpls001 plus       +7.50  -> 7.50
32
33-- Infinities
34dqpls011 plus  Infinity    -> Infinity
35dqpls012 plus  -Infinity   -> -Infinity
36
37-- NaNs, 0 payload
38ddqls021 plus         NaN  -> NaN
39ddqls022 plus        -NaN  -> -NaN
40ddqls023 plus        sNaN  -> NaN  Invalid_operation
41ddqls024 plus       -sNaN  -> -NaN Invalid_operation
42
43-- NaNs, non-0 payload
44ddqls031 plus       NaN13  -> NaN13
45ddqls032 plus      -NaN13  -> -NaN13
46ddqls033 plus      sNaN13  -> NaN13   Invalid_operation
47ddqls034 plus     -sNaN13  -> -NaN13  Invalid_operation
48ddqls035 plus       NaN70  -> NaN70
49ddqls036 plus      -NaN70  -> -NaN70
50ddqls037 plus      sNaN101 -> NaN101  Invalid_operation
51ddqls038 plus     -sNaN101 -> -NaN101 Invalid_operation
52
53-- finites
54dqpls101 plus          7   -> 7
55dqpls102 plus         -7   -> -7
56dqpls103 plus         75   -> 75
57dqpls104 plus        -75   -> -75
58dqpls105 plus       7.50   -> 7.50
59dqpls106 plus      -7.50   -> -7.50
60dqpls107 plus       7.500  -> 7.500
61dqpls108 plus      -7.500  -> -7.500
62
63-- zeros
64dqpls111 plus          0   -> 0
65dqpls112 plus         -0   -> 0
66dqpls113 plus       0E+4   -> 0E+4
67dqpls114 plus      -0E+4   -> 0E+4
68dqpls115 plus     0.0000   -> 0.0000
69dqpls116 plus    -0.0000   -> 0.0000
70dqpls117 plus      0E-141  -> 0E-141
71dqpls118 plus     -0E-141  -> 0E-141
72
73-- full coefficients, alternating bits
74dqpls121 plus   2682682682682682682682682682682682    ->  2682682682682682682682682682682682
75dqpls122 plus  -2682682682682682682682682682682682    -> -2682682682682682682682682682682682
76dqpls123 plus   1341341341341341341341341341341341    ->  1341341341341341341341341341341341
77dqpls124 plus  -1341341341341341341341341341341341    -> -1341341341341341341341341341341341
78
79-- Nmax, Nmin, Ntiny
80dqpls131 plus  9.999999999999999999999999999999999E+6144   ->  9.999999999999999999999999999999999E+6144
81dqpls132 plus  1E-6143                                     ->  1E-6143
82dqpls133 plus  1.000000000000000000000000000000000E-6143   ->  1.000000000000000000000000000000000E-6143
83dqpls134 plus  1E-6176                                     ->  1E-6176 Subnormal
84
85dqpls135 plus  -1E-6176                                    -> -1E-6176 Subnormal
86dqpls136 plus  -1.000000000000000000000000000000000E-6143  -> -1.000000000000000000000000000000000E-6143
87dqpls137 plus  -1E-6143                                    -> -1E-6143
88dqpls138 plus  -9.999999999999999999999999999999999E+6144  -> -9.999999999999999999999999999999999E+6144
89