• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1------------------------------------------------------------------------
2-- ddAdd.decTest -- decDouble addition                                --
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-- This set of tests are for decDoubles only; all arguments are
23-- representable in a decDouble
24precision:   16
25maxExponent: 384
26minExponent: -383
27extended:    1
28clamp:       1
29rounding:    half_even
30
31-- [first group are 'quick confidence check']
32ddadd001 add 1       1       ->  2
33ddadd002 add 2       3       ->  5
34ddadd003 add '5.75'  '3.3'   ->  9.05
35ddadd004 add '5'     '-3'    ->  2
36ddadd005 add '-5'    '-3'    ->  -8
37ddadd006 add '-7'    '2.5'   ->  -4.5
38ddadd007 add '0.7'   '0.3'   ->  1.0
39ddadd008 add '1.25'  '1.25'  ->  2.50
40ddadd009 add '1.23456789'  '1.00000000' -> '2.23456789'
41ddadd010 add '1.23456789'  '1.00000011' -> '2.23456800'
42
43--             1234567890123456      1234567890123456
44ddadd011 add '0.4444444444444446'  '0.5555555555555555' -> '1.000000000000000' Inexact Rounded
45ddadd012 add '0.4444444444444445'  '0.5555555555555555' -> '1.000000000000000' Rounded
46ddadd013 add '0.4444444444444444'  '0.5555555555555555' -> '0.9999999999999999'
47ddadd014 add   '4444444444444444' '0.49'   -> '4444444444444444' Inexact Rounded
48ddadd015 add   '4444444444444444' '0.499'  -> '4444444444444444' Inexact Rounded
49ddadd016 add   '4444444444444444' '0.4999' -> '4444444444444444' Inexact Rounded
50ddadd017 add   '4444444444444444' '0.5000' -> '4444444444444444' Inexact Rounded
51ddadd018 add   '4444444444444444' '0.5001' -> '4444444444444445' Inexact Rounded
52ddadd019 add   '4444444444444444' '0.501'  -> '4444444444444445' Inexact Rounded
53ddadd020 add   '4444444444444444' '0.51'   -> '4444444444444445' Inexact Rounded
54
55ddadd021 add 0 1 -> 1
56ddadd022 add 1 1 -> 2
57ddadd023 add 2 1 -> 3
58ddadd024 add 3 1 -> 4
59ddadd025 add 4 1 -> 5
60ddadd026 add 5 1 -> 6
61ddadd027 add 6 1 -> 7
62ddadd028 add 7 1 -> 8
63ddadd029 add 8 1 -> 9
64ddadd030 add 9 1 -> 10
65
66-- some carrying effects
67ddadd031 add '0.9998'  '0.0000' -> '0.9998'
68ddadd032 add '0.9998'  '0.0001' -> '0.9999'
69ddadd033 add '0.9998'  '0.0002' -> '1.0000'
70ddadd034 add '0.9998'  '0.0003' -> '1.0001'
71
72ddadd035 add '70'  '10000e+16' -> '1.000000000000000E+20' Inexact Rounded
73ddadd036 add '700'  '10000e+16' -> '1.000000000000000E+20' Inexact Rounded
74ddadd037 add '7000'  '10000e+16' -> '1.000000000000000E+20' Inexact Rounded
75ddadd038 add '70000'  '10000e+16' -> '1.000000000000001E+20' Inexact Rounded
76ddadd039 add '700000'  '10000e+16' -> '1.000000000000007E+20' Rounded
77
78-- symmetry:
79ddadd040 add '10000e+16'  '70' -> '1.000000000000000E+20' Inexact Rounded
80ddadd041 add '10000e+16'  '700' -> '1.000000000000000E+20' Inexact Rounded
81ddadd042 add '10000e+16'  '7000' -> '1.000000000000000E+20' Inexact Rounded
82ddadd044 add '10000e+16'  '70000' -> '1.000000000000001E+20' Inexact Rounded
83ddadd045 add '10000e+16'  '700000' -> '1.000000000000007E+20' Rounded
84
85-- same, without rounding
86ddadd046 add '10000e+9'  '7' -> '10000000000007'
87ddadd047 add '10000e+9'  '70' -> '10000000000070'
88ddadd048 add '10000e+9'  '700' -> '10000000000700'
89ddadd049 add '10000e+9'  '7000' -> '10000000007000'
90ddadd050 add '10000e+9'  '70000' -> '10000000070000'
91ddadd051 add '10000e+9'  '700000' -> '10000000700000'
92ddadd052 add '10000e+9'  '7000000' -> '10000007000000'
93
94-- examples from decarith
95ddadd053 add '12' '7.00' -> '19.00'
96ddadd054 add '1.3' '-1.07' -> '0.23'
97ddadd055 add '1.3' '-1.30' -> '0.00'
98ddadd056 add '1.3' '-2.07' -> '-0.77'
99ddadd057 add '1E+2' '1E+4' -> '1.01E+4'
100
101-- leading zero preservation
102ddadd061 add 1 '0.0001' -> '1.0001'
103ddadd062 add 1 '0.00001' -> '1.00001'
104ddadd063 add 1 '0.000001' -> '1.000001'
105ddadd064 add 1 '0.0000001' -> '1.0000001'
106ddadd065 add 1 '0.00000001' -> '1.00000001'
107
108-- some funny zeros [in case of bad signum]
109ddadd070 add 1  0    -> 1
110ddadd071 add 1 0.    -> 1
111ddadd072 add 1  .0   -> 1.0
112ddadd073 add 1 0.0   -> 1.0
113ddadd074 add 1 0.00  -> 1.00
114ddadd075 add  0  1   -> 1
115ddadd076 add 0.  1   -> 1
116ddadd077 add  .0 1   -> 1.0
117ddadd078 add 0.0 1   -> 1.0
118ddadd079 add 0.00 1  -> 1.00
119
120-- some carries
121ddadd080 add 999999998 1  -> 999999999
122ddadd081 add 999999999 1  -> 1000000000
123ddadd082 add  99999999 1  -> 100000000
124ddadd083 add   9999999 1  -> 10000000
125ddadd084 add    999999 1  -> 1000000
126ddadd085 add     99999 1  -> 100000
127ddadd086 add      9999 1  -> 10000
128ddadd087 add       999 1  -> 1000
129ddadd088 add        99 1  -> 100
130ddadd089 add         9 1  -> 10
131
132
133-- more LHS swaps
134ddadd090 add '-56267E-10'   0 ->  '-0.0000056267'
135ddadd091 add '-56267E-6'    0 ->  '-0.056267'
136ddadd092 add '-56267E-5'    0 ->  '-0.56267'
137ddadd093 add '-56267E-4'    0 ->  '-5.6267'
138ddadd094 add '-56267E-3'    0 ->  '-56.267'
139ddadd095 add '-56267E-2'    0 ->  '-562.67'
140ddadd096 add '-56267E-1'    0 ->  '-5626.7'
141ddadd097 add '-56267E-0'    0 ->  '-56267'
142ddadd098 add '-5E-10'       0 ->  '-5E-10'
143ddadd099 add '-5E-7'        0 ->  '-5E-7'
144ddadd100 add '-5E-6'        0 ->  '-0.000005'
145ddadd101 add '-5E-5'        0 ->  '-0.00005'
146ddadd102 add '-5E-4'        0 ->  '-0.0005'
147ddadd103 add '-5E-1'        0 ->  '-0.5'
148ddadd104 add '-5E0'         0 ->  '-5'
149ddadd105 add '-5E1'         0 ->  '-50'
150ddadd106 add '-5E5'         0 ->  '-500000'
151ddadd107 add '-5E15'        0 ->  '-5000000000000000'
152ddadd108 add '-5E16'        0 ->  '-5.000000000000000E+16'  Rounded
153ddadd109 add '-5E17'        0 ->  '-5.000000000000000E+17'  Rounded
154ddadd110 add '-5E18'        0 ->  '-5.000000000000000E+18'  Rounded
155ddadd111 add '-5E100'       0 ->  '-5.000000000000000E+100' Rounded
156
157-- more RHS swaps
158ddadd113 add 0  '-56267E-10' ->  '-0.0000056267'
159ddadd114 add 0  '-56267E-6'  ->  '-0.056267'
160ddadd116 add 0  '-56267E-5'  ->  '-0.56267'
161ddadd117 add 0  '-56267E-4'  ->  '-5.6267'
162ddadd119 add 0  '-56267E-3'  ->  '-56.267'
163ddadd120 add 0  '-56267E-2'  ->  '-562.67'
164ddadd121 add 0  '-56267E-1'  ->  '-5626.7'
165ddadd122 add 0  '-56267E-0'  ->  '-56267'
166ddadd123 add 0  '-5E-10'     ->  '-5E-10'
167ddadd124 add 0  '-5E-7'      ->  '-5E-7'
168ddadd125 add 0  '-5E-6'      ->  '-0.000005'
169ddadd126 add 0  '-5E-5'      ->  '-0.00005'
170ddadd127 add 0  '-5E-4'      ->  '-0.0005'
171ddadd128 add 0  '-5E-1'      ->  '-0.5'
172ddadd129 add 0  '-5E0'       ->  '-5'
173ddadd130 add 0  '-5E1'       ->  '-50'
174ddadd131 add 0  '-5E5'       ->  '-500000'
175ddadd132 add 0  '-5E15'      ->  '-5000000000000000'
176ddadd133 add 0  '-5E16'      ->  '-5.000000000000000E+16'   Rounded
177ddadd134 add 0  '-5E17'      ->  '-5.000000000000000E+17'   Rounded
178ddadd135 add 0  '-5E18'      ->  '-5.000000000000000E+18'   Rounded
179ddadd136 add 0  '-5E100'     ->  '-5.000000000000000E+100'  Rounded
180
181-- related
182ddadd137 add  1  '0E-19'      ->  '1.000000000000000'  Rounded
183ddadd138 add -1  '0E-19'      ->  '-1.000000000000000' Rounded
184ddadd139 add '0E-19' 1        ->  '1.000000000000000'  Rounded
185ddadd140 add '0E-19' -1       ->  '-1.000000000000000' Rounded
186ddadd141 add 1E+11   0.0000   ->  '100000000000.0000'
187ddadd142 add 1E+11   0.00000  ->  '100000000000.0000'  Rounded
188ddadd143 add 0.000   1E+12    ->  '1000000000000.000'
189ddadd144 add 0.0000  1E+12    ->  '1000000000000.000'  Rounded
190
191-- [some of the next group are really constructor tests]
192ddadd146 add '00.0'  0       ->  '0.0'
193ddadd147 add '0.00'  0       ->  '0.00'
194ddadd148 add  0      '0.00'  ->  '0.00'
195ddadd149 add  0      '00.0'  ->  '0.0'
196ddadd150 add '00.0'  '0.00'  ->  '0.00'
197ddadd151 add '0.00'  '00.0'  ->  '0.00'
198ddadd152 add '3'     '.3'    ->  '3.3'
199ddadd153 add '3.'    '.3'    ->  '3.3'
200ddadd154 add '3.0'   '.3'    ->  '3.3'
201ddadd155 add '3.00'  '.3'    ->  '3.30'
202ddadd156 add '3'     '3'     ->  '6'
203ddadd157 add '3'     '+3'    ->  '6'
204ddadd158 add '3'     '-3'    ->  '0'
205ddadd159 add '0.3'   '-0.3'  ->  '0.0'
206ddadd160 add '0.03'  '-0.03' ->  '0.00'
207
208-- try borderline precision, with carries, etc.
209ddadd161 add '1E+12' '-1'    -> '999999999999'
210ddadd162 add '1E+12'  '1.11' -> '1000000000001.11'
211ddadd163 add '1.11'  '1E+12' -> '1000000000001.11'
212ddadd164 add '-1'    '1E+12' -> '999999999999'
213ddadd165 add '7E+12' '-1'    -> '6999999999999'
214ddadd166 add '7E+12'  '1.11' -> '7000000000001.11'
215ddadd167 add '1.11'  '7E+12' -> '7000000000001.11'
216ddadd168 add '-1'    '7E+12' -> '6999999999999'
217
218rounding: half_up
219--           1.234567890123456      1234567890123456      1 234567890123456
220ddadd170 add '4.444444444444444'  '0.5555555555555567' -> '5.000000000000001' Inexact Rounded
221ddadd171 add '4.444444444444444'  '0.5555555555555566' -> '5.000000000000001' Inexact Rounded
222ddadd172 add '4.444444444444444'  '0.5555555555555565' -> '5.000000000000001' Inexact Rounded
223ddadd173 add '4.444444444444444'  '0.5555555555555564' -> '5.000000000000000' Inexact Rounded
224ddadd174 add '4.444444444444444'  '0.5555555555555553' -> '4.999999999999999' Inexact Rounded
225ddadd175 add '4.444444444444444'  '0.5555555555555552' -> '4.999999999999999' Inexact Rounded
226ddadd176 add '4.444444444444444'  '0.5555555555555551' -> '4.999999999999999' Inexact Rounded
227ddadd177 add '4.444444444444444'  '0.5555555555555550' -> '4.999999999999999' Rounded
228ddadd178 add '4.444444444444444'  '0.5555555555555545' -> '4.999999999999999' Inexact Rounded
229ddadd179 add '4.444444444444444'  '0.5555555555555544' -> '4.999999999999998' Inexact Rounded
230ddadd180 add '4.444444444444444'  '0.5555555555555543' -> '4.999999999999998' Inexact Rounded
231ddadd181 add '4.444444444444444'  '0.5555555555555542' -> '4.999999999999998' Inexact Rounded
232ddadd182 add '4.444444444444444'  '0.5555555555555541' -> '4.999999999999998' Inexact Rounded
233ddadd183 add '4.444444444444444'  '0.5555555555555540' -> '4.999999999999998' Rounded
234
235-- and some more, including residue effects and different roundings
236rounding: half_up
237ddadd200 add '1234560123456789' 0             -> '1234560123456789'
238ddadd201 add '1234560123456789' 0.000000001   -> '1234560123456789' Inexact Rounded
239ddadd202 add '1234560123456789' 0.000001      -> '1234560123456789' Inexact Rounded
240ddadd203 add '1234560123456789' 0.1           -> '1234560123456789' Inexact Rounded
241ddadd204 add '1234560123456789' 0.4           -> '1234560123456789' Inexact Rounded
242ddadd205 add '1234560123456789' 0.49          -> '1234560123456789' Inexact Rounded
243ddadd206 add '1234560123456789' 0.499999      -> '1234560123456789' Inexact Rounded
244ddadd207 add '1234560123456789' 0.499999999   -> '1234560123456789' Inexact Rounded
245ddadd208 add '1234560123456789' 0.5           -> '1234560123456790' Inexact Rounded
246ddadd209 add '1234560123456789' 0.500000001   -> '1234560123456790' Inexact Rounded
247ddadd210 add '1234560123456789' 0.500001      -> '1234560123456790' Inexact Rounded
248ddadd211 add '1234560123456789' 0.51          -> '1234560123456790' Inexact Rounded
249ddadd212 add '1234560123456789' 0.6           -> '1234560123456790' Inexact Rounded
250ddadd213 add '1234560123456789' 0.9           -> '1234560123456790' Inexact Rounded
251ddadd214 add '1234560123456789' 0.99999       -> '1234560123456790' Inexact Rounded
252ddadd215 add '1234560123456789' 0.999999999   -> '1234560123456790' Inexact Rounded
253ddadd216 add '1234560123456789' 1             -> '1234560123456790'
254ddadd217 add '1234560123456789' 1.000000001   -> '1234560123456790' Inexact Rounded
255ddadd218 add '1234560123456789' 1.00001       -> '1234560123456790' Inexact Rounded
256ddadd219 add '1234560123456789' 1.1           -> '1234560123456790' Inexact Rounded
257
258rounding: half_even
259ddadd220 add '1234560123456789' 0             -> '1234560123456789'
260ddadd221 add '1234560123456789' 0.000000001   -> '1234560123456789' Inexact Rounded
261ddadd222 add '1234560123456789' 0.000001      -> '1234560123456789' Inexact Rounded
262ddadd223 add '1234560123456789' 0.1           -> '1234560123456789' Inexact Rounded
263ddadd224 add '1234560123456789' 0.4           -> '1234560123456789' Inexact Rounded
264ddadd225 add '1234560123456789' 0.49          -> '1234560123456789' Inexact Rounded
265ddadd226 add '1234560123456789' 0.499999      -> '1234560123456789' Inexact Rounded
266ddadd227 add '1234560123456789' 0.499999999   -> '1234560123456789' Inexact Rounded
267ddadd228 add '1234560123456789' 0.5           -> '1234560123456790' Inexact Rounded
268ddadd229 add '1234560123456789' 0.500000001   -> '1234560123456790' Inexact Rounded
269ddadd230 add '1234560123456789' 0.500001      -> '1234560123456790' Inexact Rounded
270ddadd231 add '1234560123456789' 0.51          -> '1234560123456790' Inexact Rounded
271ddadd232 add '1234560123456789' 0.6           -> '1234560123456790' Inexact Rounded
272ddadd233 add '1234560123456789' 0.9           -> '1234560123456790' Inexact Rounded
273ddadd234 add '1234560123456789' 0.99999       -> '1234560123456790' Inexact Rounded
274ddadd235 add '1234560123456789' 0.999999999   -> '1234560123456790' Inexact Rounded
275ddadd236 add '1234560123456789' 1             -> '1234560123456790'
276ddadd237 add '1234560123456789' 1.00000001    -> '1234560123456790' Inexact Rounded
277ddadd238 add '1234560123456789' 1.00001       -> '1234560123456790' Inexact Rounded
278ddadd239 add '1234560123456789' 1.1           -> '1234560123456790' Inexact Rounded
279-- critical few with even bottom digit...
280ddadd240 add '1234560123456788' 0.499999999   -> '1234560123456788' Inexact Rounded
281ddadd241 add '1234560123456788' 0.5           -> '1234560123456788' Inexact Rounded
282ddadd242 add '1234560123456788' 0.500000001   -> '1234560123456789' Inexact Rounded
283
284rounding: down
285ddadd250 add '1234560123456789' 0             -> '1234560123456789'
286ddadd251 add '1234560123456789' 0.000000001   -> '1234560123456789' Inexact Rounded
287ddadd252 add '1234560123456789' 0.000001      -> '1234560123456789' Inexact Rounded
288ddadd253 add '1234560123456789' 0.1           -> '1234560123456789' Inexact Rounded
289ddadd254 add '1234560123456789' 0.4           -> '1234560123456789' Inexact Rounded
290ddadd255 add '1234560123456789' 0.49          -> '1234560123456789' Inexact Rounded
291ddadd256 add '1234560123456789' 0.499999      -> '1234560123456789' Inexact Rounded
292ddadd257 add '1234560123456789' 0.499999999   -> '1234560123456789' Inexact Rounded
293ddadd258 add '1234560123456789' 0.5           -> '1234560123456789' Inexact Rounded
294ddadd259 add '1234560123456789' 0.500000001   -> '1234560123456789' Inexact Rounded
295ddadd260 add '1234560123456789' 0.500001      -> '1234560123456789' Inexact Rounded
296ddadd261 add '1234560123456789' 0.51          -> '1234560123456789' Inexact Rounded
297ddadd262 add '1234560123456789' 0.6           -> '1234560123456789' Inexact Rounded
298ddadd263 add '1234560123456789' 0.9           -> '1234560123456789' Inexact Rounded
299ddadd264 add '1234560123456789' 0.99999       -> '1234560123456789' Inexact Rounded
300ddadd265 add '1234560123456789' 0.999999999   -> '1234560123456789' Inexact Rounded
301ddadd266 add '1234560123456789' 1             -> '1234560123456790'
302ddadd267 add '1234560123456789' 1.00000001    -> '1234560123456790' Inexact Rounded
303ddadd268 add '1234560123456789' 1.00001       -> '1234560123456790' Inexact Rounded
304ddadd269 add '1234560123456789' 1.1           -> '1234560123456790' Inexact Rounded
305
306-- 1 in last place tests
307rounding: half_up
308ddadd301 add  -1   1      ->   0
309ddadd302 add   0   1      ->   1
310ddadd303 add   1   1      ->   2
311ddadd304 add  12   1      ->  13
312ddadd305 add  98   1      ->  99
313ddadd306 add  99   1      -> 100
314ddadd307 add 100   1      -> 101
315ddadd308 add 101   1      -> 102
316ddadd309 add  -1  -1      ->  -2
317ddadd310 add   0  -1      ->  -1
318ddadd311 add   1  -1      ->   0
319ddadd312 add  12  -1      ->  11
320ddadd313 add  98  -1      ->  97
321ddadd314 add  99  -1      ->  98
322ddadd315 add 100  -1      ->  99
323ddadd316 add 101  -1      -> 100
324
325ddadd321 add -0.01  0.01    ->  0.00
326ddadd322 add  0.00  0.01    ->  0.01
327ddadd323 add  0.01  0.01    ->  0.02
328ddadd324 add  0.12  0.01    ->  0.13
329ddadd325 add  0.98  0.01    ->  0.99
330ddadd326 add  0.99  0.01    ->  1.00
331ddadd327 add  1.00  0.01    ->  1.01
332ddadd328 add  1.01  0.01    ->  1.02
333ddadd329 add -0.01 -0.01    -> -0.02
334ddadd330 add  0.00 -0.01    -> -0.01
335ddadd331 add  0.01 -0.01    ->  0.00
336ddadd332 add  0.12 -0.01    ->  0.11
337ddadd333 add  0.98 -0.01    ->  0.97
338ddadd334 add  0.99 -0.01    ->  0.98
339ddadd335 add  1.00 -0.01    ->  0.99
340ddadd336 add  1.01 -0.01    ->  1.00
341
342-- some more cases where adding 0 affects the coefficient
343ddadd340 add 1E+3    0    ->         1000
344ddadd341 add 1E+15   0    ->    1000000000000000
345ddadd342 add 1E+16   0    ->   1.000000000000000E+16  Rounded
346ddadd343 add 1E+20   0    ->   1.000000000000000E+20  Rounded
347-- which simply follow from these cases ...
348ddadd344 add 1E+3    1    ->         1001
349ddadd345 add 1E+15   1    ->    1000000000000001
350ddadd346 add 1E+16   1    ->   1.000000000000000E+16  Inexact Rounded
351ddadd347 add 1E+20   1    ->   1.000000000000000E+20  Inexact Rounded
352ddadd348 add 1E+3    7    ->         1007
353ddadd349 add 1E+15   7    ->    1000000000000007
354ddadd350 add 1E+16   7    ->   1.000000000000001E+16  Inexact Rounded
355ddadd351 add 1E+20   7    ->   1.000000000000000E+20  Inexact Rounded
356
357-- tryzeros cases
358rounding:    half_up
359ddadd360  add 0E+50 10000E+1  -> 1.0000E+5
360ddadd361  add 0E-50 10000E+1  -> 100000.0000000000 Rounded
361ddadd362  add 10000E+1 0E-50  -> 100000.0000000000 Rounded
362ddadd363  add 10000E+1 10000E-50  -> 100000.0000000000 Rounded Inexact
363ddadd364  add 9.999999999999999E+384 -9.999999999999999E+384 -> 0E+369
364
365-- a curiosity from JSR 13 testing
366rounding:    half_down
367ddadd370 add  999999999999999 815 -> 1000000000000814
368ddadd371 add 9999999999999999 815 -> 1.000000000000081E+16 Rounded Inexact
369rounding:    half_up
370ddadd372 add  999999999999999 815 -> 1000000000000814
371ddadd373 add 9999999999999999 815 -> 1.000000000000081E+16 Rounded Inexact
372rounding:    half_even
373ddadd374 add  999999999999999 815 -> 1000000000000814
374ddadd375 add 9999999999999999 815 -> 1.000000000000081E+16 Rounded Inexact
375
376-- operands folded
377ddadd380 add   1E+384  1E+384  ->  2.000000000000000E+384  Clamped
378ddadd381 add   1E+380  1E+380  ->  2.00000000000E+380      Clamped
379ddadd382 add   1E+376  1E+376  ->  2.0000000E+376          Clamped
380ddadd383 add   1E+372  1E+372  ->  2.000E+372              Clamped
381ddadd384 add   1E+370  1E+370  ->  2.0E+370                Clamped
382ddadd385 add   1E+369  1E+369  ->  2E+369
383ddadd386 add   1E+368  1E+368  ->  2E+368
384
385-- ulp replacement tests
386ddadd400 add   1   77e-14      ->  1.00000000000077
387ddadd401 add   1   77e-15      ->  1.000000000000077
388ddadd402 add   1   77e-16      ->  1.000000000000008 Inexact Rounded
389ddadd403 add   1   77e-17      ->  1.000000000000001 Inexact Rounded
390ddadd404 add   1   77e-18      ->  1.000000000000000 Inexact Rounded
391ddadd405 add   1   77e-19      ->  1.000000000000000 Inexact Rounded
392ddadd406 add   1   77e-299     ->  1.000000000000000 Inexact Rounded
393
394ddadd410 add  10   77e-14      ->  10.00000000000077
395ddadd411 add  10   77e-15      ->  10.00000000000008 Inexact Rounded
396ddadd412 add  10   77e-16      ->  10.00000000000001 Inexact Rounded
397ddadd413 add  10   77e-17      ->  10.00000000000000 Inexact Rounded
398ddadd414 add  10   77e-18      ->  10.00000000000000 Inexact Rounded
399ddadd415 add  10   77e-19      ->  10.00000000000000 Inexact Rounded
400ddadd416 add  10   77e-299     ->  10.00000000000000 Inexact Rounded
401
402ddadd420 add  77e-14       1   ->  1.00000000000077
403ddadd421 add  77e-15       1   ->  1.000000000000077
404ddadd422 add  77e-16       1   ->  1.000000000000008 Inexact Rounded
405ddadd423 add  77e-17       1   ->  1.000000000000001 Inexact Rounded
406ddadd424 add  77e-18       1   ->  1.000000000000000 Inexact Rounded
407ddadd425 add  77e-19       1   ->  1.000000000000000 Inexact Rounded
408ddadd426 add  77e-299      1   ->  1.000000000000000 Inexact Rounded
409
410ddadd430 add  77e-14      10   ->  10.00000000000077
411ddadd431 add  77e-15      10   ->  10.00000000000008 Inexact Rounded
412ddadd432 add  77e-16      10   ->  10.00000000000001 Inexact Rounded
413ddadd433 add  77e-17      10   ->  10.00000000000000 Inexact Rounded
414ddadd434 add  77e-18      10   ->  10.00000000000000 Inexact Rounded
415ddadd435 add  77e-19      10   ->  10.00000000000000 Inexact Rounded
416ddadd436 add  77e-299     10   ->  10.00000000000000 Inexact Rounded
417
418-- fastpath boundary (more in dqadd)
419--            1234567890123456
420ddadd539 add '4444444444444444'  '3333333333333333' -> '7777777777777777'
421ddadd540 add '4444444444444444'  '4444444444444444' -> '8888888888888888'
422ddadd541 add '4444444444444444'  '5555555555555555' -> '9999999999999999'
423ddadd542 add '3333333333333333'  '4444444444444444' -> '7777777777777777'
424ddadd543 add '4444444444444444'  '4444444444444444' -> '8888888888888888'
425ddadd544 add '5555555555555555'  '4444444444444444' -> '9999999999999999'
426ddadd545 add '3000004000000000'  '3000000000000040' -> '6000004000000040'
427ddadd546 add '3000000400000000'  '4000000000000400' -> '7000000400000400'
428ddadd547 add '3000000040000000'  '5000000000004000' -> '8000000040004000'
429ddadd548 add '4000000004000000'  '3000000000040000' -> '7000000004040000'
430ddadd549 add '4000000000400000'  '4000000000400000' -> '8000000000800000'
431ddadd550 add '4000000000040000'  '5000000004000000' -> '9000000004040000'
432ddadd551 add '5000000000004000'  '3000000040000000' -> '8000000040004000'
433ddadd552 add '5000000000000400'  '4000000400000000' -> '9000000400000400'
434ddadd553 add '5000000000000040'  '5000004000000000' -> 1.000000400000004E+16 Rounded
435-- check propagation
436ddadd554 add '8999999999999999'  '0000000000000001' -> 9000000000000000
437ddadd555 add '0000000000000001'  '8999999999999999' -> 9000000000000000
438ddadd556 add '0999999999999999'  '0000000000000001' -> 1000000000000000
439ddadd557 add '0000000000000001'  '0999999999999999' -> 1000000000000000
440ddadd558 add '4444444444444444'  '4555555555555556' -> 9000000000000000
441ddadd559 add '4555555555555556'  '4444444444444444' -> 9000000000000000
442
443-- negative ulps
444ddadd6440 add   1   -77e-14      ->  0.99999999999923
445ddadd6441 add   1   -77e-15      ->  0.999999999999923
446ddadd6442 add   1   -77e-16      ->  0.9999999999999923
447ddadd6443 add   1   -77e-17      ->  0.9999999999999992 Inexact Rounded
448ddadd6444 add   1   -77e-18      ->  0.9999999999999999 Inexact Rounded
449ddadd6445 add   1   -77e-19      ->  1.000000000000000 Inexact Rounded
450ddadd6446 add   1   -77e-99      ->  1.000000000000000 Inexact Rounded
451
452ddadd6450 add  10   -77e-14      ->   9.99999999999923
453ddadd6451 add  10   -77e-15      ->   9.999999999999923
454ddadd6452 add  10   -77e-16      ->   9.999999999999992 Inexact Rounded
455ddadd6453 add  10   -77e-17      ->   9.999999999999999 Inexact Rounded
456ddadd6454 add  10   -77e-18      ->  10.00000000000000 Inexact Rounded
457ddadd6455 add  10   -77e-19      ->  10.00000000000000 Inexact Rounded
458ddadd6456 add  10   -77e-99      ->  10.00000000000000 Inexact Rounded
459
460ddadd6460 add  -77e-14       1   ->  0.99999999999923
461ddadd6461 add  -77e-15       1   ->  0.999999999999923
462ddadd6462 add  -77e-16       1   ->  0.9999999999999923
463ddadd6463 add  -77e-17       1   ->  0.9999999999999992 Inexact Rounded
464ddadd6464 add  -77e-18       1   ->  0.9999999999999999 Inexact Rounded
465ddadd6465 add  -77e-19       1   ->  1.000000000000000 Inexact Rounded
466ddadd6466 add  -77e-99       1   ->  1.000000000000000 Inexact Rounded
467
468ddadd6470 add  -77e-14      10   ->   9.99999999999923
469ddadd6471 add  -77e-15      10   ->   9.999999999999923
470ddadd6472 add  -77e-16      10   ->   9.999999999999992 Inexact Rounded
471ddadd6473 add  -77e-17      10   ->   9.999999999999999 Inexact Rounded
472ddadd6474 add  -77e-18      10   ->  10.00000000000000 Inexact Rounded
473ddadd6475 add  -77e-19      10   ->  10.00000000000000 Inexact Rounded
474ddadd6476 add  -77e-99      10   ->  10.00000000000000 Inexact Rounded
475
476-- negative ulps
477ddadd6480 add  -1    77e-14      ->  -0.99999999999923
478ddadd6481 add  -1    77e-15      ->  -0.999999999999923
479ddadd6482 add  -1    77e-16      ->  -0.9999999999999923
480ddadd6483 add  -1    77e-17      ->  -0.9999999999999992 Inexact Rounded
481ddadd6484 add  -1    77e-18      ->  -0.9999999999999999 Inexact Rounded
482ddadd6485 add  -1    77e-19      ->  -1.000000000000000 Inexact Rounded
483ddadd6486 add  -1    77e-99      ->  -1.000000000000000 Inexact Rounded
484
485ddadd6490 add -10    77e-14      ->   -9.99999999999923
486ddadd6491 add -10    77e-15      ->   -9.999999999999923
487ddadd6492 add -10    77e-16      ->   -9.999999999999992 Inexact Rounded
488ddadd6493 add -10    77e-17      ->   -9.999999999999999 Inexact Rounded
489ddadd6494 add -10    77e-18      ->  -10.00000000000000 Inexact Rounded
490ddadd6495 add -10    77e-19      ->  -10.00000000000000 Inexact Rounded
491ddadd6496 add -10    77e-99      ->  -10.00000000000000 Inexact Rounded
492
493ddadd6500 add   77e-14      -1   ->  -0.99999999999923
494ddadd6501 add   77e-15      -1   ->  -0.999999999999923
495ddadd6502 add   77e-16      -1   ->  -0.9999999999999923
496ddadd6503 add   77e-17      -1   ->  -0.9999999999999992 Inexact Rounded
497ddadd6504 add   77e-18      -1   ->  -0.9999999999999999 Inexact Rounded
498ddadd6505 add   77e-19      -1   ->  -1.000000000000000 Inexact Rounded
499ddadd6506 add   77e-99      -1   ->  -1.000000000000000 Inexact Rounded
500
501ddadd6510 add   77e-14      -10  ->   -9.99999999999923
502ddadd6511 add   77e-15      -10  ->   -9.999999999999923
503ddadd6512 add   77e-16      -10  ->   -9.999999999999992 Inexact Rounded
504ddadd6513 add   77e-17      -10  ->   -9.999999999999999 Inexact Rounded
505ddadd6514 add   77e-18      -10  ->  -10.00000000000000 Inexact Rounded
506ddadd6515 add   77e-19      -10  ->  -10.00000000000000 Inexact Rounded
507ddadd6516 add   77e-99      -10  ->  -10.00000000000000 Inexact Rounded
508
509-- and some more residue effects and different roundings
510rounding: half_up
511ddadd6540 add '6543210123456789' 0             -> '6543210123456789'
512ddadd6541 add '6543210123456789' 0.000000001   -> '6543210123456789' Inexact Rounded
513ddadd6542 add '6543210123456789' 0.000001      -> '6543210123456789' Inexact Rounded
514ddadd6543 add '6543210123456789' 0.1           -> '6543210123456789' Inexact Rounded
515ddadd6544 add '6543210123456789' 0.4           -> '6543210123456789' Inexact Rounded
516ddadd6545 add '6543210123456789' 0.49          -> '6543210123456789' Inexact Rounded
517ddadd6546 add '6543210123456789' 0.499999      -> '6543210123456789' Inexact Rounded
518ddadd6547 add '6543210123456789' 0.499999999   -> '6543210123456789' Inexact Rounded
519ddadd6548 add '6543210123456789' 0.5           -> '6543210123456790' Inexact Rounded
520ddadd6549 add '6543210123456789' 0.500000001   -> '6543210123456790' Inexact Rounded
521ddadd6550 add '6543210123456789' 0.500001      -> '6543210123456790' Inexact Rounded
522ddadd6551 add '6543210123456789' 0.51          -> '6543210123456790' Inexact Rounded
523ddadd6552 add '6543210123456789' 0.6           -> '6543210123456790' Inexact Rounded
524ddadd6553 add '6543210123456789' 0.9           -> '6543210123456790' Inexact Rounded
525ddadd6554 add '6543210123456789' 0.99999       -> '6543210123456790' Inexact Rounded
526ddadd6555 add '6543210123456789' 0.999999999   -> '6543210123456790' Inexact Rounded
527ddadd6556 add '6543210123456789' 1             -> '6543210123456790'
528ddadd6557 add '6543210123456789' 1.000000001   -> '6543210123456790' Inexact Rounded
529ddadd6558 add '6543210123456789' 1.00001       -> '6543210123456790' Inexact Rounded
530ddadd6559 add '6543210123456789' 1.1           -> '6543210123456790' Inexact Rounded
531
532rounding: half_even
533ddadd6560 add '6543210123456789' 0             -> '6543210123456789'
534ddadd6561 add '6543210123456789' 0.000000001   -> '6543210123456789' Inexact Rounded
535ddadd6562 add '6543210123456789' 0.000001      -> '6543210123456789' Inexact Rounded
536ddadd6563 add '6543210123456789' 0.1           -> '6543210123456789' Inexact Rounded
537ddadd6564 add '6543210123456789' 0.4           -> '6543210123456789' Inexact Rounded
538ddadd6565 add '6543210123456789' 0.49          -> '6543210123456789' Inexact Rounded
539ddadd6566 add '6543210123456789' 0.499999      -> '6543210123456789' Inexact Rounded
540ddadd6567 add '6543210123456789' 0.499999999   -> '6543210123456789' Inexact Rounded
541ddadd6568 add '6543210123456789' 0.5           -> '6543210123456790' Inexact Rounded
542ddadd6569 add '6543210123456789' 0.500000001   -> '6543210123456790' Inexact Rounded
543ddadd6570 add '6543210123456789' 0.500001      -> '6543210123456790' Inexact Rounded
544ddadd6571 add '6543210123456789' 0.51          -> '6543210123456790' Inexact Rounded
545ddadd6572 add '6543210123456789' 0.6           -> '6543210123456790' Inexact Rounded
546ddadd6573 add '6543210123456789' 0.9           -> '6543210123456790' Inexact Rounded
547ddadd6574 add '6543210123456789' 0.99999       -> '6543210123456790' Inexact Rounded
548ddadd6575 add '6543210123456789' 0.999999999   -> '6543210123456790' Inexact Rounded
549ddadd6576 add '6543210123456789' 1             -> '6543210123456790'
550ddadd6577 add '6543210123456789' 1.00000001    -> '6543210123456790' Inexact Rounded
551ddadd6578 add '6543210123456789' 1.00001       -> '6543210123456790' Inexact Rounded
552ddadd6579 add '6543210123456789' 1.1           -> '6543210123456790' Inexact Rounded
553
554-- critical few with even bottom digit...
555ddadd7540 add '6543210123456788' 0.499999999   -> '6543210123456788' Inexact Rounded
556ddadd7541 add '6543210123456788' 0.5           -> '6543210123456788' Inexact Rounded
557ddadd7542 add '6543210123456788' 0.500000001   -> '6543210123456789' Inexact Rounded
558
559rounding: down
560ddadd7550 add '6543210123456789' 0             -> '6543210123456789'
561ddadd7551 add '6543210123456789' 0.000000001   -> '6543210123456789' Inexact Rounded
562ddadd7552 add '6543210123456789' 0.000001      -> '6543210123456789' Inexact Rounded
563ddadd7553 add '6543210123456789' 0.1           -> '6543210123456789' Inexact Rounded
564ddadd7554 add '6543210123456789' 0.4           -> '6543210123456789' Inexact Rounded
565ddadd7555 add '6543210123456789' 0.49          -> '6543210123456789' Inexact Rounded
566ddadd7556 add '6543210123456789' 0.499999      -> '6543210123456789' Inexact Rounded
567ddadd7557 add '6543210123456789' 0.499999999   -> '6543210123456789' Inexact Rounded
568ddadd7558 add '6543210123456789' 0.5           -> '6543210123456789' Inexact Rounded
569ddadd7559 add '6543210123456789' 0.500000001   -> '6543210123456789' Inexact Rounded
570ddadd7560 add '6543210123456789' 0.500001      -> '6543210123456789' Inexact Rounded
571ddadd7561 add '6543210123456789' 0.51          -> '6543210123456789' Inexact Rounded
572ddadd7562 add '6543210123456789' 0.6           -> '6543210123456789' Inexact Rounded
573ddadd7563 add '6543210123456789' 0.9           -> '6543210123456789' Inexact Rounded
574ddadd7564 add '6543210123456789' 0.99999       -> '6543210123456789' Inexact Rounded
575ddadd7565 add '6543210123456789' 0.999999999   -> '6543210123456789' Inexact Rounded
576ddadd7566 add '6543210123456789' 1             -> '6543210123456790'
577ddadd7567 add '6543210123456789' 1.00000001    -> '6543210123456790' Inexact Rounded
578ddadd7568 add '6543210123456789' 1.00001       -> '6543210123456790' Inexact Rounded
579ddadd7569 add '6543210123456789' 1.1           -> '6543210123456790' Inexact Rounded
580
581-- verify a query
582rounding:     down
583ddadd7661 add 1e-398 9.000000000000000E+384 -> 9.000000000000000E+384 Inexact Rounded
584ddadd7662 add      0 9.000000000000000E+384 -> 9.000000000000000E+384 Rounded
585ddadd7663 add 1e-388 9.000000000000000E+374 -> 9.000000000000000E+374 Inexact Rounded
586ddadd7664 add      0 9.000000000000000E+374 -> 9.000000000000000E+374 Rounded
587
588-- more zeros, etc.
589rounding: half_even
590
591ddadd7701 add 5.00 1.00E-3 -> 5.00100
592ddadd7702 add 00.00 0.000  -> 0.000
593ddadd7703 add 00.00 0E-3   -> 0.000
594ddadd7704 add 0E-3  00.00  -> 0.000
595
596ddadd7710 add 0E+3  00.00  -> 0.00
597ddadd7711 add 0E+3  00.0   -> 0.0
598ddadd7712 add 0E+3  00.    -> 0
599ddadd7713 add 0E+3  00.E+1 -> 0E+1
600ddadd7714 add 0E+3  00.E+2 -> 0E+2
601ddadd7715 add 0E+3  00.E+3 -> 0E+3
602ddadd7716 add 0E+3  00.E+4 -> 0E+3
603ddadd7717 add 0E+3  00.E+5 -> 0E+3
604ddadd7718 add 0E+3  -00.0   -> 0.0
605ddadd7719 add 0E+3  -00.    -> 0
606ddadd7731 add 0E+3  -00.E+1 -> 0E+1
607
608ddadd7720 add 00.00  0E+3  -> 0.00
609ddadd7721 add 00.0   0E+3  -> 0.0
610ddadd7722 add 00.    0E+3  -> 0
611ddadd7723 add 00.E+1 0E+3  -> 0E+1
612ddadd7724 add 00.E+2 0E+3  -> 0E+2
613ddadd7725 add 00.E+3 0E+3  -> 0E+3
614ddadd7726 add 00.E+4 0E+3  -> 0E+3
615ddadd7727 add 00.E+5 0E+3  -> 0E+3
616ddadd7728 add -00.00 0E+3  -> 0.00
617ddadd7729 add -00.0  0E+3  -> 0.0
618ddadd7730 add -00.   0E+3  -> 0
619
620ddadd7732 add  0     0     ->  0
621ddadd7733 add  0    -0     ->  0
622ddadd7734 add -0     0     ->  0
623ddadd7735 add -0    -0     -> -0     -- IEEE 854 special case
624
625ddadd7736 add  1    -1     ->  0
626ddadd7737 add -1    -1     -> -2
627ddadd7738 add  1     1     ->  2
628ddadd7739 add -1     1     ->  0
629
630ddadd7741 add  0    -1     -> -1
631ddadd7742 add -0    -1     -> -1
632ddadd7743 add  0     1     ->  1
633ddadd7744 add -0     1     ->  1
634ddadd7745 add -1     0     -> -1
635ddadd7746 add -1    -0     -> -1
636ddadd7747 add  1     0     ->  1
637ddadd7748 add  1    -0     ->  1
638
639ddadd7751 add  0.0  -1     -> -1.0
640ddadd7752 add -0.0  -1     -> -1.0
641ddadd7753 add  0.0   1     ->  1.0
642ddadd7754 add -0.0   1     ->  1.0
643ddadd7755 add -1.0   0     -> -1.0
644ddadd7756 add -1.0  -0     -> -1.0
645ddadd7757 add  1.0   0     ->  1.0
646ddadd7758 add  1.0  -0     ->  1.0
647
648ddadd7761 add  0    -1.0   -> -1.0
649ddadd7762 add -0    -1.0   -> -1.0
650ddadd7763 add  0     1.0   ->  1.0
651ddadd7764 add -0     1.0   ->  1.0
652ddadd7765 add -1     0.0   -> -1.0
653ddadd7766 add -1    -0.0   -> -1.0
654ddadd7767 add  1     0.0   ->  1.0
655ddadd7768 add  1    -0.0   ->  1.0
656
657ddadd7771 add  0.0  -1.0   -> -1.0
658ddadd7772 add -0.0  -1.0   -> -1.0
659ddadd7773 add  0.0   1.0   ->  1.0
660ddadd7774 add -0.0   1.0   ->  1.0
661ddadd7775 add -1.0   0.0   -> -1.0
662ddadd7776 add -1.0  -0.0   -> -1.0
663ddadd7777 add  1.0   0.0   ->  1.0
664ddadd7778 add  1.0  -0.0   ->  1.0
665
666-- Specials
667ddadd7780 add -Inf  -Inf   -> -Infinity
668ddadd7781 add -Inf  -1000  -> -Infinity
669ddadd7782 add -Inf  -1     -> -Infinity
670ddadd7783 add -Inf  -0     -> -Infinity
671ddadd7784 add -Inf   0     -> -Infinity
672ddadd7785 add -Inf   1     -> -Infinity
673ddadd7786 add -Inf   1000  -> -Infinity
674ddadd7787 add -1000 -Inf   -> -Infinity
675ddadd7788 add -Inf  -Inf   -> -Infinity
676ddadd7789 add -1    -Inf   -> -Infinity
677ddadd7790 add -0    -Inf   -> -Infinity
678ddadd7791 add  0    -Inf   -> -Infinity
679ddadd7792 add  1    -Inf   -> -Infinity
680ddadd7793 add  1000 -Inf   -> -Infinity
681ddadd7794 add  Inf  -Inf   ->  NaN  Invalid_operation
682
683ddadd7800 add  Inf  -Inf   ->  NaN  Invalid_operation
684ddadd7801 add  Inf  -1000  ->  Infinity
685ddadd7802 add  Inf  -1     ->  Infinity
686ddadd7803 add  Inf  -0     ->  Infinity
687ddadd7804 add  Inf   0     ->  Infinity
688ddadd7805 add  Inf   1     ->  Infinity
689ddadd7806 add  Inf   1000  ->  Infinity
690ddadd7807 add  Inf   Inf   ->  Infinity
691ddadd7808 add -1000  Inf   ->  Infinity
692ddadd7809 add -Inf   Inf   ->  NaN  Invalid_operation
693ddadd7810 add -1     Inf   ->  Infinity
694ddadd7811 add -0     Inf   ->  Infinity
695ddadd7812 add  0     Inf   ->  Infinity
696ddadd7813 add  1     Inf   ->  Infinity
697ddadd7814 add  1000  Inf   ->  Infinity
698ddadd7815 add  Inf   Inf   ->  Infinity
699
700ddadd7821 add  NaN -Inf    ->  NaN
701ddadd7822 add  NaN -1000   ->  NaN
702ddadd7823 add  NaN -1      ->  NaN
703ddadd7824 add  NaN -0      ->  NaN
704ddadd7825 add  NaN  0      ->  NaN
705ddadd7826 add  NaN  1      ->  NaN
706ddadd7827 add  NaN  1000   ->  NaN
707ddadd7828 add  NaN  Inf    ->  NaN
708ddadd7829 add  NaN  NaN    ->  NaN
709ddadd7830 add -Inf  NaN    ->  NaN
710ddadd7831 add -1000 NaN    ->  NaN
711ddadd7832 add -1    NaN    ->  NaN
712ddadd7833 add -0    NaN    ->  NaN
713ddadd7834 add  0    NaN    ->  NaN
714ddadd7835 add  1    NaN    ->  NaN
715ddadd7836 add  1000 NaN    ->  NaN
716ddadd7837 add  Inf  NaN    ->  NaN
717
718ddadd7841 add  sNaN -Inf   ->  NaN  Invalid_operation
719ddadd7842 add  sNaN -1000  ->  NaN  Invalid_operation
720ddadd7843 add  sNaN -1     ->  NaN  Invalid_operation
721ddadd7844 add  sNaN -0     ->  NaN  Invalid_operation
722ddadd7845 add  sNaN  0     ->  NaN  Invalid_operation
723ddadd7846 add  sNaN  1     ->  NaN  Invalid_operation
724ddadd7847 add  sNaN  1000  ->  NaN  Invalid_operation
725ddadd7848 add  sNaN  NaN   ->  NaN  Invalid_operation
726ddadd7849 add  sNaN sNaN   ->  NaN  Invalid_operation
727ddadd7850 add  NaN  sNaN   ->  NaN  Invalid_operation
728ddadd7851 add -Inf  sNaN   ->  NaN  Invalid_operation
729ddadd7852 add -1000 sNaN   ->  NaN  Invalid_operation
730ddadd7853 add -1    sNaN   ->  NaN  Invalid_operation
731ddadd7854 add -0    sNaN   ->  NaN  Invalid_operation
732ddadd7855 add  0    sNaN   ->  NaN  Invalid_operation
733ddadd7856 add  1    sNaN   ->  NaN  Invalid_operation
734ddadd7857 add  1000 sNaN   ->  NaN  Invalid_operation
735ddadd7858 add  Inf  sNaN   ->  NaN  Invalid_operation
736ddadd7859 add  NaN  sNaN   ->  NaN  Invalid_operation
737
738-- propagating NaNs
739ddadd7861 add  NaN1   -Inf    ->  NaN1
740ddadd7862 add +NaN2   -1000   ->  NaN2
741ddadd7863 add  NaN3    1000   ->  NaN3
742ddadd7864 add  NaN4    Inf    ->  NaN4
743ddadd7865 add  NaN5   +NaN6   ->  NaN5
744ddadd7866 add -Inf     NaN7   ->  NaN7
745ddadd7867 add -1000    NaN8   ->  NaN8
746ddadd7868 add  1000    NaN9   ->  NaN9
747ddadd7869 add  Inf    +NaN10  ->  NaN10
748ddadd7871 add  sNaN11  -Inf   ->  NaN11  Invalid_operation
749ddadd7872 add  sNaN12  -1000  ->  NaN12  Invalid_operation
750ddadd7873 add  sNaN13   1000  ->  NaN13  Invalid_operation
751ddadd7874 add  sNaN14   NaN17 ->  NaN14  Invalid_operation
752ddadd7875 add  sNaN15  sNaN18 ->  NaN15  Invalid_operation
753ddadd7876 add  NaN16   sNaN19 ->  NaN19  Invalid_operation
754ddadd7877 add -Inf    +sNaN20 ->  NaN20  Invalid_operation
755ddadd7878 add -1000    sNaN21 ->  NaN21  Invalid_operation
756ddadd7879 add  1000    sNaN22 ->  NaN22  Invalid_operation
757ddadd7880 add  Inf     sNaN23 ->  NaN23  Invalid_operation
758ddadd7881 add +NaN25  +sNaN24 ->  NaN24  Invalid_operation
759ddadd7882 add -NaN26    NaN28 -> -NaN26
760ddadd7883 add -sNaN27  sNaN29 -> -NaN27  Invalid_operation
761ddadd7884 add  1000    -NaN30 -> -NaN30
762ddadd7885 add  1000   -sNaN31 -> -NaN31  Invalid_operation
763
764-- Here we explore near the boundary of rounding a subnormal to Nmin
765ddadd7575 add  1E-383 -1E-398 ->  9.99999999999999E-384  Subnormal
766ddadd7576 add -1E-383 +1E-398 -> -9.99999999999999E-384  Subnormal
767
768-- and another curious case
769ddadd7577 add 7.000000000000E-385 -1.00000E-391 -> 6.999999000000E-385 Subnormal
770
771-- check overflow edge case
772--               1234567890123456
773ddadd7972 apply   9.999999999999999E+384         -> 9.999999999999999E+384
774ddadd7973 add     9.999999999999999E+384  1      -> 9.999999999999999E+384 Inexact Rounded
775ddadd7974 add      9999999999999999E+369  1      -> 9.999999999999999E+384 Inexact Rounded
776ddadd7975 add      9999999999999999E+369  1E+369  -> Infinity Overflow Inexact Rounded
777ddadd7976 add      9999999999999999E+369  9E+368  -> Infinity Overflow Inexact Rounded
778ddadd7977 add      9999999999999999E+369  8E+368  -> Infinity Overflow Inexact Rounded
779ddadd7978 add      9999999999999999E+369  7E+368  -> Infinity Overflow Inexact Rounded
780ddadd7979 add      9999999999999999E+369  6E+368  -> Infinity Overflow Inexact Rounded
781ddadd7980 add      9999999999999999E+369  5E+368  -> Infinity Overflow Inexact Rounded
782ddadd7981 add      9999999999999999E+369  4E+368  -> 9.999999999999999E+384 Inexact Rounded
783ddadd7982 add      9999999999999999E+369  3E+368  -> 9.999999999999999E+384 Inexact Rounded
784ddadd7983 add      9999999999999999E+369  2E+368  -> 9.999999999999999E+384 Inexact Rounded
785ddadd7984 add      9999999999999999E+369  1E+368  -> 9.999999999999999E+384 Inexact Rounded
786
787ddadd7985 apply  -9.999999999999999E+384         -> -9.999999999999999E+384
788ddadd7986 add    -9.999999999999999E+384 -1      -> -9.999999999999999E+384 Inexact Rounded
789ddadd7987 add     -9999999999999999E+369 -1      -> -9.999999999999999E+384 Inexact Rounded
790ddadd7988 add     -9999999999999999E+369 -1E+369  -> -Infinity Overflow Inexact Rounded
791ddadd7989 add     -9999999999999999E+369 -9E+368  -> -Infinity Overflow Inexact Rounded
792ddadd7990 add     -9999999999999999E+369 -8E+368  -> -Infinity Overflow Inexact Rounded
793ddadd7991 add     -9999999999999999E+369 -7E+368  -> -Infinity Overflow Inexact Rounded
794ddadd7992 add     -9999999999999999E+369 -6E+368  -> -Infinity Overflow Inexact Rounded
795ddadd7993 add     -9999999999999999E+369 -5E+368  -> -Infinity Overflow Inexact Rounded
796ddadd7994 add     -9999999999999999E+369 -4E+368  -> -9.999999999999999E+384 Inexact Rounded
797ddadd7995 add     -9999999999999999E+369 -3E+368  -> -9.999999999999999E+384 Inexact Rounded
798ddadd7996 add     -9999999999999999E+369 -2E+368  -> -9.999999999999999E+384 Inexact Rounded
799ddadd7997 add     -9999999999999999E+369 -1E+368  -> -9.999999999999999E+384 Inexact Rounded
800
801-- And for round down full and subnormal results
802rounding:     down
803ddadd71100 add 1e+2 -1e-383    -> 99.99999999999999 Rounded Inexact
804ddadd71101 add 1e+1 -1e-383    -> 9.999999999999999  Rounded Inexact
805ddadd71103 add   +1 -1e-383    -> 0.9999999999999999  Rounded Inexact
806ddadd71104 add 1e-1 -1e-383    -> 0.09999999999999999  Rounded Inexact
807ddadd71105 add 1e-2 -1e-383    -> 0.009999999999999999  Rounded Inexact
808ddadd71106 add 1e-3 -1e-383    -> 0.0009999999999999999  Rounded Inexact
809ddadd71107 add 1e-4 -1e-383    -> 0.00009999999999999999  Rounded Inexact
810ddadd71108 add 1e-5 -1e-383    -> 0.000009999999999999999  Rounded Inexact
811ddadd71109 add 1e-6 -1e-383    -> 9.999999999999999E-7  Rounded Inexact
812
813rounding:     ceiling
814ddadd71110 add -1e+2 +1e-383   -> -99.99999999999999 Rounded Inexact
815ddadd71111 add -1e+1 +1e-383   -> -9.999999999999999  Rounded Inexact
816ddadd71113 add    -1 +1e-383   -> -0.9999999999999999  Rounded Inexact
817ddadd71114 add -1e-1 +1e-383   -> -0.09999999999999999  Rounded Inexact
818ddadd71115 add -1e-2 +1e-383   -> -0.009999999999999999  Rounded Inexact
819ddadd71116 add -1e-3 +1e-383   -> -0.0009999999999999999  Rounded Inexact
820ddadd71117 add -1e-4 +1e-383   -> -0.00009999999999999999  Rounded Inexact
821ddadd71118 add -1e-5 +1e-383   -> -0.000009999999999999999  Rounded Inexact
822ddadd71119 add -1e-6 +1e-383   -> -9.999999999999999E-7  Rounded Inexact
823
824-- tests based on Gunnar Degnbol's edge case
825rounding:     half_even
826
827ddadd71300 add 1E16  -0.5                 ->  1.000000000000000E+16 Inexact Rounded
828ddadd71310 add 1E16  -0.51                ->  9999999999999999      Inexact Rounded
829ddadd71311 add 1E16  -0.501               ->  9999999999999999      Inexact Rounded
830ddadd71312 add 1E16  -0.5001              ->  9999999999999999      Inexact Rounded
831ddadd71313 add 1E16  -0.50001             ->  9999999999999999      Inexact Rounded
832ddadd71314 add 1E16  -0.500001            ->  9999999999999999      Inexact Rounded
833ddadd71315 add 1E16  -0.5000001           ->  9999999999999999      Inexact Rounded
834ddadd71316 add 1E16  -0.50000001          ->  9999999999999999      Inexact Rounded
835ddadd71317 add 1E16  -0.500000001         ->  9999999999999999      Inexact Rounded
836ddadd71318 add 1E16  -0.5000000001        ->  9999999999999999      Inexact Rounded
837ddadd71319 add 1E16  -0.50000000001       ->  9999999999999999      Inexact Rounded
838ddadd71320 add 1E16  -0.500000000001      ->  9999999999999999      Inexact Rounded
839ddadd71321 add 1E16  -0.5000000000001     ->  9999999999999999      Inexact Rounded
840ddadd71322 add 1E16  -0.50000000000001    ->  9999999999999999      Inexact Rounded
841ddadd71323 add 1E16  -0.500000000000001   ->  9999999999999999      Inexact Rounded
842ddadd71324 add 1E16  -0.5000000000000001  ->  9999999999999999      Inexact Rounded
843ddadd71325 add 1E16  -0.5000000000000000  ->  1.000000000000000E+16 Inexact Rounded
844ddadd71326 add 1E16  -0.500000000000000   ->  1.000000000000000E+16 Inexact Rounded
845ddadd71327 add 1E16  -0.50000000000000    ->  1.000000000000000E+16 Inexact Rounded
846ddadd71328 add 1E16  -0.5000000000000     ->  1.000000000000000E+16 Inexact Rounded
847ddadd71329 add 1E16  -0.500000000000      ->  1.000000000000000E+16 Inexact Rounded
848ddadd71330 add 1E16  -0.50000000000       ->  1.000000000000000E+16 Inexact Rounded
849ddadd71331 add 1E16  -0.5000000000        ->  1.000000000000000E+16 Inexact Rounded
850ddadd71332 add 1E16  -0.500000000         ->  1.000000000000000E+16 Inexact Rounded
851ddadd71333 add 1E16  -0.50000000          ->  1.000000000000000E+16 Inexact Rounded
852ddadd71334 add 1E16  -0.5000000           ->  1.000000000000000E+16 Inexact Rounded
853ddadd71335 add 1E16  -0.500000            ->  1.000000000000000E+16 Inexact Rounded
854ddadd71336 add 1E16  -0.50000             ->  1.000000000000000E+16 Inexact Rounded
855ddadd71337 add 1E16  -0.5000              ->  1.000000000000000E+16 Inexact Rounded
856ddadd71338 add 1E16  -0.500               ->  1.000000000000000E+16 Inexact Rounded
857ddadd71339 add 1E16  -0.50                ->  1.000000000000000E+16 Inexact Rounded
858
859ddadd71340 add 1E16  -5000000.000010001   ->  9999999995000000      Inexact Rounded
860ddadd71341 add 1E16  -5000000.000000001   ->  9999999995000000      Inexact Rounded
861
862ddadd71349 add 9999999999999999 0.4                 ->  9999999999999999      Inexact Rounded
863ddadd71350 add 9999999999999999 0.49                ->  9999999999999999      Inexact Rounded
864ddadd71351 add 9999999999999999 0.499               ->  9999999999999999      Inexact Rounded
865ddadd71352 add 9999999999999999 0.4999              ->  9999999999999999      Inexact Rounded
866ddadd71353 add 9999999999999999 0.49999             ->  9999999999999999      Inexact Rounded
867ddadd71354 add 9999999999999999 0.499999            ->  9999999999999999      Inexact Rounded
868ddadd71355 add 9999999999999999 0.4999999           ->  9999999999999999      Inexact Rounded
869ddadd71356 add 9999999999999999 0.49999999          ->  9999999999999999      Inexact Rounded
870ddadd71357 add 9999999999999999 0.499999999         ->  9999999999999999      Inexact Rounded
871ddadd71358 add 9999999999999999 0.4999999999        ->  9999999999999999      Inexact Rounded
872ddadd71359 add 9999999999999999 0.49999999999       ->  9999999999999999      Inexact Rounded
873ddadd71360 add 9999999999999999 0.499999999999      ->  9999999999999999      Inexact Rounded
874ddadd71361 add 9999999999999999 0.4999999999999     ->  9999999999999999      Inexact Rounded
875ddadd71362 add 9999999999999999 0.49999999999999    ->  9999999999999999      Inexact Rounded
876ddadd71363 add 9999999999999999 0.499999999999999   ->  9999999999999999      Inexact Rounded
877ddadd71364 add 9999999999999999 0.4999999999999999  ->  9999999999999999      Inexact Rounded
878ddadd71365 add 9999999999999999 0.5000000000000000  ->  1.000000000000000E+16 Inexact Rounded
879ddadd71367 add 9999999999999999 0.500000000000000   ->  1.000000000000000E+16 Inexact Rounded
880ddadd71368 add 9999999999999999 0.50000000000000    ->  1.000000000000000E+16 Inexact Rounded
881ddadd71369 add 9999999999999999 0.5000000000000     ->  1.000000000000000E+16 Inexact Rounded
882ddadd71370 add 9999999999999999 0.500000000000      ->  1.000000000000000E+16 Inexact Rounded
883ddadd71371 add 9999999999999999 0.50000000000       ->  1.000000000000000E+16 Inexact Rounded
884ddadd71372 add 9999999999999999 0.5000000000        ->  1.000000000000000E+16 Inexact Rounded
885ddadd71373 add 9999999999999999 0.500000000         ->  1.000000000000000E+16 Inexact Rounded
886ddadd71374 add 9999999999999999 0.50000000          ->  1.000000000000000E+16 Inexact Rounded
887ddadd71375 add 9999999999999999 0.5000000           ->  1.000000000000000E+16 Inexact Rounded
888ddadd71376 add 9999999999999999 0.500000            ->  1.000000000000000E+16 Inexact Rounded
889ddadd71377 add 9999999999999999 0.50000             ->  1.000000000000000E+16 Inexact Rounded
890ddadd71378 add 9999999999999999 0.5000              ->  1.000000000000000E+16 Inexact Rounded
891ddadd71379 add 9999999999999999 0.500               ->  1.000000000000000E+16 Inexact Rounded
892ddadd71380 add 9999999999999999 0.50                ->  1.000000000000000E+16 Inexact Rounded
893ddadd71381 add 9999999999999999 0.5                 ->  1.000000000000000E+16 Inexact Rounded
894ddadd71382 add 9999999999999999 0.5000000000000001  ->  1.000000000000000E+16 Inexact Rounded
895ddadd71383 add 9999999999999999 0.500000000000001   ->  1.000000000000000E+16 Inexact Rounded
896ddadd71384 add 9999999999999999 0.50000000000001    ->  1.000000000000000E+16 Inexact Rounded
897ddadd71385 add 9999999999999999 0.5000000000001     ->  1.000000000000000E+16 Inexact Rounded
898ddadd71386 add 9999999999999999 0.500000000001      ->  1.000000000000000E+16 Inexact Rounded
899ddadd71387 add 9999999999999999 0.50000000001       ->  1.000000000000000E+16 Inexact Rounded
900ddadd71388 add 9999999999999999 0.5000000001        ->  1.000000000000000E+16 Inexact Rounded
901ddadd71389 add 9999999999999999 0.500000001         ->  1.000000000000000E+16 Inexact Rounded
902ddadd71390 add 9999999999999999 0.50000001          ->  1.000000000000000E+16 Inexact Rounded
903ddadd71391 add 9999999999999999 0.5000001           ->  1.000000000000000E+16 Inexact Rounded
904ddadd71392 add 9999999999999999 0.500001            ->  1.000000000000000E+16 Inexact Rounded
905ddadd71393 add 9999999999999999 0.50001             ->  1.000000000000000E+16 Inexact Rounded
906ddadd71394 add 9999999999999999 0.5001              ->  1.000000000000000E+16 Inexact Rounded
907ddadd71395 add 9999999999999999 0.501               ->  1.000000000000000E+16 Inexact Rounded
908ddadd71396 add 9999999999999999 0.51                ->  1.000000000000000E+16 Inexact Rounded
909
910-- More GD edge cases, where difference between the unadjusted
911-- exponents is larger than the maximum precision and one side is 0
912ddadd71420 add  0 1.123456789012345     -> 1.123456789012345
913ddadd71421 add  0 1.123456789012345E-1  -> 0.1123456789012345
914ddadd71422 add  0 1.123456789012345E-2  -> 0.01123456789012345
915ddadd71423 add  0 1.123456789012345E-3  -> 0.001123456789012345
916ddadd71424 add  0 1.123456789012345E-4  -> 0.0001123456789012345
917ddadd71425 add  0 1.123456789012345E-5  -> 0.00001123456789012345
918ddadd71426 add  0 1.123456789012345E-6  -> 0.000001123456789012345
919ddadd71427 add  0 1.123456789012345E-7  -> 1.123456789012345E-7
920ddadd71428 add  0 1.123456789012345E-8  -> 1.123456789012345E-8
921ddadd71429 add  0 1.123456789012345E-9  -> 1.123456789012345E-9
922ddadd71430 add  0 1.123456789012345E-10 -> 1.123456789012345E-10
923ddadd71431 add  0 1.123456789012345E-11 -> 1.123456789012345E-11
924ddadd71432 add  0 1.123456789012345E-12 -> 1.123456789012345E-12
925ddadd71433 add  0 1.123456789012345E-13 -> 1.123456789012345E-13
926ddadd71434 add  0 1.123456789012345E-14 -> 1.123456789012345E-14
927ddadd71435 add  0 1.123456789012345E-15 -> 1.123456789012345E-15
928ddadd71436 add  0 1.123456789012345E-16 -> 1.123456789012345E-16
929ddadd71437 add  0 1.123456789012345E-17 -> 1.123456789012345E-17
930ddadd71438 add  0 1.123456789012345E-18 -> 1.123456789012345E-18
931ddadd71439 add  0 1.123456789012345E-19 -> 1.123456789012345E-19
932
933-- same, reversed 0
934ddadd71440 add 1.123456789012345     0 -> 1.123456789012345
935ddadd71441 add 1.123456789012345E-1  0 -> 0.1123456789012345
936ddadd71442 add 1.123456789012345E-2  0 -> 0.01123456789012345
937ddadd71443 add 1.123456789012345E-3  0 -> 0.001123456789012345
938ddadd71444 add 1.123456789012345E-4  0 -> 0.0001123456789012345
939ddadd71445 add 1.123456789012345E-5  0 -> 0.00001123456789012345
940ddadd71446 add 1.123456789012345E-6  0 -> 0.000001123456789012345
941ddadd71447 add 1.123456789012345E-7  0 -> 1.123456789012345E-7
942ddadd71448 add 1.123456789012345E-8  0 -> 1.123456789012345E-8
943ddadd71449 add 1.123456789012345E-9  0 -> 1.123456789012345E-9
944ddadd71450 add 1.123456789012345E-10 0 -> 1.123456789012345E-10
945ddadd71451 add 1.123456789012345E-11 0 -> 1.123456789012345E-11
946ddadd71452 add 1.123456789012345E-12 0 -> 1.123456789012345E-12
947ddadd71453 add 1.123456789012345E-13 0 -> 1.123456789012345E-13
948ddadd71454 add 1.123456789012345E-14 0 -> 1.123456789012345E-14
949ddadd71455 add 1.123456789012345E-15 0 -> 1.123456789012345E-15
950ddadd71456 add 1.123456789012345E-16 0 -> 1.123456789012345E-16
951ddadd71457 add 1.123456789012345E-17 0 -> 1.123456789012345E-17
952ddadd71458 add 1.123456789012345E-18 0 -> 1.123456789012345E-18
953ddadd71459 add 1.123456789012345E-19 0 -> 1.123456789012345E-19
954
955-- same, Es on the 0
956ddadd71460 add 1.123456789012345  0E-0   -> 1.123456789012345
957ddadd71461 add 1.123456789012345  0E-1   -> 1.123456789012345
958ddadd71462 add 1.123456789012345  0E-2   -> 1.123456789012345
959ddadd71463 add 1.123456789012345  0E-3   -> 1.123456789012345
960ddadd71464 add 1.123456789012345  0E-4   -> 1.123456789012345
961ddadd71465 add 1.123456789012345  0E-5   -> 1.123456789012345
962ddadd71466 add 1.123456789012345  0E-6   -> 1.123456789012345
963ddadd71467 add 1.123456789012345  0E-7   -> 1.123456789012345
964ddadd71468 add 1.123456789012345  0E-8   -> 1.123456789012345
965ddadd71469 add 1.123456789012345  0E-9   -> 1.123456789012345
966ddadd71470 add 1.123456789012345  0E-10  -> 1.123456789012345
967ddadd71471 add 1.123456789012345  0E-11  -> 1.123456789012345
968ddadd71472 add 1.123456789012345  0E-12  -> 1.123456789012345
969ddadd71473 add 1.123456789012345  0E-13  -> 1.123456789012345
970ddadd71474 add 1.123456789012345  0E-14  -> 1.123456789012345
971ddadd71475 add 1.123456789012345  0E-15  -> 1.123456789012345
972-- next four flag Rounded because the 0 extends the result
973ddadd71476 add 1.123456789012345  0E-16  -> 1.123456789012345 Rounded
974ddadd71477 add 1.123456789012345  0E-17  -> 1.123456789012345 Rounded
975ddadd71478 add 1.123456789012345  0E-18  -> 1.123456789012345 Rounded
976ddadd71479 add 1.123456789012345  0E-19  -> 1.123456789012345 Rounded
977
978-- sum of two opposite-sign operands is exactly 0 and floor => -0
979rounding:    half_up
980-- exact zeros from zeros
981ddadd71500 add  0        0E-19  ->  0E-19
982ddadd71501 add -0        0E-19  ->  0E-19
983ddadd71502 add  0       -0E-19  ->  0E-19
984ddadd71503 add -0       -0E-19  -> -0E-19
985-- exact zeros from non-zeros
986ddadd71511 add -11      11    ->  0
987ddadd71512 add  11     -11    ->  0
988
989rounding:    half_down
990-- exact zeros from zeros
991ddadd71520 add  0        0E-19  ->  0E-19
992ddadd71521 add -0        0E-19  ->  0E-19
993ddadd71522 add  0       -0E-19  ->  0E-19
994ddadd71523 add -0       -0E-19  -> -0E-19
995-- exact zeros from non-zeros
996ddadd71531 add -11      11    ->  0
997ddadd71532 add  11     -11    ->  0
998
999rounding:    half_even
1000-- exact zeros from zeros
1001ddadd71540 add  0        0E-19  ->  0E-19
1002ddadd71541 add -0        0E-19  ->  0E-19
1003ddadd71542 add  0       -0E-19  ->  0E-19
1004ddadd71543 add -0       -0E-19  -> -0E-19
1005-- exact zeros from non-zeros
1006ddadd71551 add -11      11    ->  0
1007ddadd71552 add  11     -11    ->  0
1008
1009rounding:    up
1010-- exact zeros from zeros
1011ddadd71560 add  0        0E-19  ->  0E-19
1012ddadd71561 add -0        0E-19  ->  0E-19
1013ddadd71562 add  0       -0E-19  ->  0E-19
1014ddadd71563 add -0       -0E-19  -> -0E-19
1015-- exact zeros from non-zeros
1016ddadd71571 add -11      11    ->  0
1017ddadd71572 add  11     -11    ->  0
1018
1019rounding:    down
1020-- exact zeros from zeros
1021ddadd71580 add  0        0E-19  ->  0E-19
1022ddadd71581 add -0        0E-19  ->  0E-19
1023ddadd71582 add  0       -0E-19  ->  0E-19
1024ddadd71583 add -0       -0E-19  -> -0E-19
1025-- exact zeros from non-zeros
1026ddadd71591 add -11      11    ->  0
1027ddadd71592 add  11     -11    ->  0
1028
1029rounding:    ceiling
1030-- exact zeros from zeros
1031ddadd71600 add  0        0E-19  ->  0E-19
1032ddadd71601 add -0        0E-19  ->  0E-19
1033ddadd71602 add  0       -0E-19  ->  0E-19
1034ddadd71603 add -0       -0E-19  -> -0E-19
1035-- exact zeros from non-zeros
1036ddadd71611 add -11      11    ->  0
1037ddadd71612 add  11     -11    ->  0
1038
1039-- and the extra-special ugly case; unusual minuses marked by -- *
1040rounding:    floor
1041-- exact zeros from zeros
1042ddadd71620 add  0        0E-19  ->  0E-19
1043ddadd71621 add -0        0E-19  -> -0E-19           -- *
1044ddadd71622 add  0       -0E-19  -> -0E-19           -- *
1045ddadd71623 add -0       -0E-19  -> -0E-19
1046-- exact zeros from non-zeros
1047ddadd71631 add -11      11    ->  -0                -- *
1048ddadd71632 add  11     -11    ->  -0                -- *
1049
1050-- Examples from SQL proposal (Krishna Kulkarni)
1051ddadd71701 add 130E-2    120E-2    -> 2.50
1052ddadd71702 add 130E-2    12E-1     -> 2.50
1053ddadd71703 add 130E-2    1E0       -> 2.30
1054ddadd71704 add 1E2       1E4       -> 1.01E+4
1055ddadd71705 add 130E-2   -120E-2 -> 0.10
1056ddadd71706 add 130E-2   -12E-1  -> 0.10
1057ddadd71707 add 130E-2   -1E0    -> 0.30
1058ddadd71708 add 1E2      -1E4    -> -9.9E+3
1059
1060-- query from Vincent Kulandaisamy
1061rounding: ceiling
1062ddadd71801  add  7.8822773805862E+277    -5.1757503820663E-21 -> 7.882277380586200E+277 Inexact Rounded
1063ddadd71802  add  7.882277380586200E+277  12.341               -> 7.882277380586201E+277 Inexact Rounded
1064ddadd71803  add  7.882277380586201E+277  2.7270545046613E-31  -> 7.882277380586202E+277 Inexact Rounded
1065
1066ddadd71811  add                   12.341 -5.1757503820663E-21 -> 12.34100000000000      Inexact Rounded
1067ddadd71812  add        12.34100000000000 2.7270545046613E-31  -> 12.34100000000001      Inexact Rounded
1068ddadd71813  add        12.34100000000001 7.8822773805862E+277 -> 7.882277380586201E+277 Inexact Rounded
1069
1070-- Gappy coefficients; check residue handling even with full coefficient gap
1071rounding: half_even
1072
1073ddadd75001 add 1234567890123456 1      -> 1234567890123457
1074ddadd75002 add 1234567890123456 0.6    -> 1234567890123457  Inexact Rounded
1075ddadd75003 add 1234567890123456 0.06   -> 1234567890123456  Inexact Rounded
1076ddadd75004 add 1234567890123456 6E-3   -> 1234567890123456  Inexact Rounded
1077ddadd75005 add 1234567890123456 6E-4   -> 1234567890123456  Inexact Rounded
1078ddadd75006 add 1234567890123456 6E-5   -> 1234567890123456  Inexact Rounded
1079ddadd75007 add 1234567890123456 6E-6   -> 1234567890123456  Inexact Rounded
1080ddadd75008 add 1234567890123456 6E-7   -> 1234567890123456  Inexact Rounded
1081ddadd75009 add 1234567890123456 6E-8   -> 1234567890123456  Inexact Rounded
1082ddadd75010 add 1234567890123456 6E-9   -> 1234567890123456  Inexact Rounded
1083ddadd75011 add 1234567890123456 6E-10  -> 1234567890123456  Inexact Rounded
1084ddadd75012 add 1234567890123456 6E-11  -> 1234567890123456  Inexact Rounded
1085ddadd75013 add 1234567890123456 6E-12  -> 1234567890123456  Inexact Rounded
1086ddadd75014 add 1234567890123456 6E-13  -> 1234567890123456  Inexact Rounded
1087ddadd75015 add 1234567890123456 6E-14  -> 1234567890123456  Inexact Rounded
1088ddadd75016 add 1234567890123456 6E-15  -> 1234567890123456  Inexact Rounded
1089ddadd75017 add 1234567890123456 6E-16  -> 1234567890123456  Inexact Rounded
1090ddadd75018 add 1234567890123456 6E-17  -> 1234567890123456  Inexact Rounded
1091ddadd75019 add 1234567890123456 6E-18  -> 1234567890123456  Inexact Rounded
1092ddadd75020 add 1234567890123456 6E-19  -> 1234567890123456  Inexact Rounded
1093ddadd75021 add 1234567890123456 6E-20  -> 1234567890123456  Inexact Rounded
1094
1095-- widening second argument at gap
1096ddadd75030 add 12345678 1                       -> 12345679
1097ddadd75031 add 12345678 0.1                     -> 12345678.1
1098ddadd75032 add 12345678 0.12                    -> 12345678.12
1099ddadd75033 add 12345678 0.123                   -> 12345678.123
1100ddadd75034 add 12345678 0.1234                  -> 12345678.1234
1101ddadd75035 add 12345678 0.12345                 -> 12345678.12345
1102ddadd75036 add 12345678 0.123456                -> 12345678.123456
1103ddadd75037 add 12345678 0.1234567               -> 12345678.1234567
1104ddadd75038 add 12345678 0.12345678              -> 12345678.12345678
1105ddadd75039 add 12345678 0.123456789             -> 12345678.12345679 Inexact Rounded
1106ddadd75040 add 12345678 0.123456785             -> 12345678.12345678 Inexact Rounded
1107ddadd75041 add 12345678 0.1234567850            -> 12345678.12345678 Inexact Rounded
1108ddadd75042 add 12345678 0.1234567851            -> 12345678.12345679 Inexact Rounded
1109ddadd75043 add 12345678 0.12345678501           -> 12345678.12345679 Inexact Rounded
1110ddadd75044 add 12345678 0.123456785001          -> 12345678.12345679 Inexact Rounded
1111ddadd75045 add 12345678 0.1234567850001         -> 12345678.12345679 Inexact Rounded
1112ddadd75046 add 12345678 0.12345678500001        -> 12345678.12345679 Inexact Rounded
1113ddadd75047 add 12345678 0.123456785000001       -> 12345678.12345679 Inexact Rounded
1114ddadd75048 add 12345678 0.1234567850000001      -> 12345678.12345679 Inexact Rounded
1115ddadd75049 add 12345678 0.1234567850000000      -> 12345678.12345678 Inexact Rounded
1116--                               90123456
1117rounding: half_even
1118ddadd75050 add 12345678 0.0234567750000000      -> 12345678.02345678 Inexact Rounded
1119ddadd75051 add 12345678 0.0034567750000000      -> 12345678.00345678 Inexact Rounded
1120ddadd75052 add 12345678 0.0004567750000000      -> 12345678.00045678 Inexact Rounded
1121ddadd75053 add 12345678 0.0000567750000000      -> 12345678.00005678 Inexact Rounded
1122ddadd75054 add 12345678 0.0000067750000000      -> 12345678.00000678 Inexact Rounded
1123ddadd75055 add 12345678 0.0000007750000000      -> 12345678.00000078 Inexact Rounded
1124ddadd75056 add 12345678 0.0000000750000000      -> 12345678.00000008 Inexact Rounded
1125ddadd75057 add 12345678 0.0000000050000000      -> 12345678.00000000 Inexact Rounded
1126ddadd75060 add 12345678 0.0234567750000001      -> 12345678.02345678 Inexact Rounded
1127ddadd75061 add 12345678 0.0034567750000001      -> 12345678.00345678 Inexact Rounded
1128ddadd75062 add 12345678 0.0004567750000001      -> 12345678.00045678 Inexact Rounded
1129ddadd75063 add 12345678 0.0000567750000001      -> 12345678.00005678 Inexact Rounded
1130ddadd75064 add 12345678 0.0000067750000001      -> 12345678.00000678 Inexact Rounded
1131ddadd75065 add 12345678 0.0000007750000001      -> 12345678.00000078 Inexact Rounded
1132ddadd75066 add 12345678 0.0000000750000001      -> 12345678.00000008 Inexact Rounded
1133ddadd75067 add 12345678 0.0000000050000001      -> 12345678.00000001 Inexact Rounded
1134-- far-out residues (full coefficient gap is 16+15 digits)
1135rounding: up
1136ddadd75070 add 12345678 1E-8                    -> 12345678.00000001
1137ddadd75071 add 12345678 1E-9                    -> 12345678.00000001 Inexact Rounded
1138ddadd75072 add 12345678 1E-10                   -> 12345678.00000001 Inexact Rounded
1139ddadd75073 add 12345678 1E-11                   -> 12345678.00000001 Inexact Rounded
1140ddadd75074 add 12345678 1E-12                   -> 12345678.00000001 Inexact Rounded
1141ddadd75075 add 12345678 1E-13                   -> 12345678.00000001 Inexact Rounded
1142ddadd75076 add 12345678 1E-14                   -> 12345678.00000001 Inexact Rounded
1143ddadd75077 add 12345678 1E-15                   -> 12345678.00000001 Inexact Rounded
1144ddadd75078 add 12345678 1E-16                   -> 12345678.00000001 Inexact Rounded
1145ddadd75079 add 12345678 1E-17                   -> 12345678.00000001 Inexact Rounded
1146ddadd75080 add 12345678 1E-18                   -> 12345678.00000001 Inexact Rounded
1147ddadd75081 add 12345678 1E-19                   -> 12345678.00000001 Inexact Rounded
1148ddadd75082 add 12345678 1E-20                   -> 12345678.00000001 Inexact Rounded
1149ddadd75083 add 12345678 1E-25                   -> 12345678.00000001 Inexact Rounded
1150ddadd75084 add 12345678 1E-30                   -> 12345678.00000001 Inexact Rounded
1151ddadd75085 add 12345678 1E-31                   -> 12345678.00000001 Inexact Rounded
1152ddadd75086 add 12345678 1E-32                   -> 12345678.00000001 Inexact Rounded
1153ddadd75087 add 12345678 1E-33                   -> 12345678.00000001 Inexact Rounded
1154ddadd75088 add 12345678 1E-34                   -> 12345678.00000001 Inexact Rounded
1155ddadd75089 add 12345678 1E-35                   -> 12345678.00000001 Inexact Rounded
1156
1157-- Punit's
1158ddadd75100 add 1.000 -200.000                   -> -199.000
1159
1160-- Rounding swathe
1161rounding: half_even
1162ddadd81100 add  .2300    12345678901234.00    ->  12345678901234.23  Rounded
1163ddadd81101 add  .2301    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1164ddadd81102 add  .2310    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1165ddadd81103 add  .2350    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1166ddadd81104 add  .2351    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1167ddadd81105 add  .2450    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1168ddadd81106 add  .2451    12345678901234.00    ->  12345678901234.25  Inexact Rounded
1169ddadd81107 add  .2360    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1170ddadd81108 add  .2370    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1171ddadd81109 add  .2399    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1172ddadd81120 add  9999999999999999E+369  9E+369  ->  Infinity Overflow  Inexact Rounded
1173ddadd81121 add -9999999999999999E+369 -9E+369 -> -Infinity Overflow  Inexact Rounded
1174
1175rounding: half_up
1176ddadd81200 add  .2300    12345678901234.00    ->  12345678901234.23  Rounded
1177ddadd81201 add  .2301    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1178ddadd81202 add  .2310    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1179ddadd81203 add  .2350    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1180ddadd81204 add  .2351    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1181ddadd81205 add  .2450    12345678901234.00    ->  12345678901234.25  Inexact Rounded
1182ddadd81206 add  .2451    12345678901234.00    ->  12345678901234.25  Inexact Rounded
1183ddadd81207 add  .2360    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1184ddadd81208 add  .2370    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1185ddadd81209 add  .2399    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1186ddadd81220 add  9999999999999999E+369  9E+369 ->  Infinity Overflow  Inexact Rounded
1187ddadd81221 add -9999999999999999E+369 -9E+369 -> -Infinity Overflow  Inexact Rounded
1188
1189rounding: half_down
1190ddadd81300 add  .2300    12345678901234.00    ->  12345678901234.23  Rounded
1191ddadd81301 add  .2301    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1192ddadd81302 add  .2310    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1193ddadd81303 add  .2350    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1194ddadd81304 add  .2351    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1195ddadd81305 add  .2450    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1196ddadd81306 add  .2451    12345678901234.00    ->  12345678901234.25  Inexact Rounded
1197ddadd81307 add  .2360    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1198ddadd81308 add  .2370    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1199ddadd81309 add  .2399    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1200ddadd81320 add  9999999999999999E+369  9E+369 ->  Infinity Overflow  Inexact Rounded
1201ddadd81321 add -9999999999999999E+369 -9E+369 -> -Infinity Overflow  Inexact Rounded
1202
1203rounding: up
1204ddadd81400 add  .2300    12345678901234.00    ->  12345678901234.23  Rounded
1205ddadd81401 add  .2301    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1206ddadd81402 add  .2310    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1207ddadd81403 add  .2350    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1208ddadd81404 add  .2351    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1209ddadd81405 add  .2450    12345678901234.00    ->  12345678901234.25  Inexact Rounded
1210ddadd81406 add  .2451    12345678901234.00    ->  12345678901234.25  Inexact Rounded
1211ddadd81407 add  .2360    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1212ddadd81408 add  .2370    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1213ddadd81409 add  .2399    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1214ddadd81411 add -.2399   -12345678901234.00    -> -12345678901234.24  Inexact Rounded
1215ddadd81420 add  9999999999999999E+369  9E+369 ->  Infinity Overflow  Inexact Rounded
1216ddadd81421 add -9999999999999999E+369 -9E+369 -> -Infinity Overflow  Inexact Rounded
1217
1218rounding: down
1219ddadd81500 add  .2300    12345678901234.00    ->  12345678901234.23  Rounded
1220ddadd81501 add  .2301    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1221ddadd81502 add  .2310    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1222ddadd81503 add  .2350    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1223ddadd81504 add  .2351    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1224ddadd81505 add  .2450    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1225ddadd81506 add  .2451    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1226ddadd81507 add  .2360    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1227ddadd81508 add  .2370    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1228ddadd81509 add  .2399    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1229ddadd81511 add -.2399   -12345678901234.00    -> -12345678901234.23  Inexact Rounded
1230ddadd81520 add  9999999999999999E+369  9E+369 ->  9.999999999999999E+384 Overflow  Inexact Rounded
1231ddadd81521 add -9999999999999999E+369 -9E+369 -> -9.999999999999999E+384 Overflow  Inexact Rounded
1232
1233rounding: ceiling
1234ddadd81600 add  .2300    12345678901234.00    ->  12345678901234.23  Rounded
1235ddadd81601 add  .2301    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1236ddadd81602 add  .2310    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1237ddadd81603 add  .2350    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1238ddadd81604 add  .2351    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1239ddadd81605 add  .2450    12345678901234.00    ->  12345678901234.25  Inexact Rounded
1240ddadd81606 add  .2451    12345678901234.00    ->  12345678901234.25  Inexact Rounded
1241ddadd81607 add  .2360    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1242ddadd81608 add  .2370    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1243ddadd81609 add  .2399    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1244ddadd81611 add -.2399   -12345678901234.00    -> -12345678901234.23  Inexact Rounded
1245ddadd81620 add  9999999999999999E+369  9E+369 ->  Infinity Overflow  Inexact Rounded
1246ddadd81621 add -9999999999999999E+369 -9E+369 -> -9.999999999999999E+384 Overflow  Inexact Rounded
1247
1248rounding: floor
1249ddadd81700 add  .2300    12345678901234.00    ->  12345678901234.23  Rounded
1250ddadd81701 add  .2301    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1251ddadd81702 add  .2310    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1252ddadd81703 add  .2350    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1253ddadd81704 add  .2351    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1254ddadd81705 add  .2450    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1255ddadd81706 add  .2451    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1256ddadd81707 add  .2360    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1257ddadd81708 add  .2370    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1258ddadd81709 add  .2399    12345678901234.00    ->  12345678901234.23  Inexact Rounded
1259ddadd81711 add -.2399   -12345678901234.00    -> -12345678901234.24  Inexact Rounded
1260ddadd81720 add  9999999999999999E+369  9E+369 ->  9.999999999999999E+384 Overflow  Inexact Rounded
1261ddadd81721 add -9999999999999999E+369 -9E+369 -> -Infinity Overflow  Inexact Rounded
1262
1263rounding: 05up
1264ddadd81800 add  .2000    12345678901234.00    ->  12345678901234.20  Rounded
1265ddadd81801 add  .2001    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1266ddadd81802 add  .2010    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1267ddadd81803 add  .2050    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1268ddadd81804 add  .2051    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1269ddadd81807 add  .2060    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1270ddadd81808 add  .2070    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1271ddadd81809 add  .2099    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1272ddadd81811 add -.2099   -12345678901234.00    -> -12345678901234.21  Inexact Rounded
1273ddadd81820 add  9999999999999999E+369  9E+369 ->  9.999999999999999E+384 Overflow  Inexact Rounded
1274ddadd81821 add -9999999999999999E+369 -9E+369 -> -9.999999999999999E+384 Overflow  Inexact Rounded
1275
1276ddadd81900 add  .2100    12345678901234.00    ->  12345678901234.21  Rounded
1277ddadd81901 add  .2101    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1278ddadd81902 add  .2110    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1279ddadd81903 add  .2150    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1280ddadd81904 add  .2151    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1281ddadd81907 add  .2160    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1282ddadd81908 add  .2170    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1283ddadd81909 add  .2199    12345678901234.00    ->  12345678901234.21  Inexact Rounded
1284ddadd81911 add -.2199   -12345678901234.00    -> -12345678901234.21  Inexact Rounded
1285
1286ddadd82000 add  .2400    12345678901234.00    ->  12345678901234.24  Rounded
1287ddadd82001 add  .2401    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1288ddadd82002 add  .2410    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1289ddadd82003 add  .2450    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1290ddadd82004 add  .2451    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1291ddadd82007 add  .2460    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1292ddadd82008 add  .2470    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1293ddadd82009 add  .2499    12345678901234.00    ->  12345678901234.24  Inexact Rounded
1294ddadd82011 add -.2499   -12345678901234.00    -> -12345678901234.24  Inexact Rounded
1295
1296ddadd82100 add  .2500    12345678901234.00    ->  12345678901234.25  Rounded
1297ddadd82101 add  .2501    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1298ddadd82102 add  .2510    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1299ddadd82103 add  .2550    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1300ddadd82104 add  .2551    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1301ddadd82107 add  .2560    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1302ddadd82108 add  .2570    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1303ddadd82109 add  .2599    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1304ddadd82111 add -.2599   -12345678901234.00    -> -12345678901234.26  Inexact Rounded
1305
1306ddadd82200 add  .2600    12345678901234.00    ->  12345678901234.26  Rounded
1307ddadd82201 add  .2601    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1308ddadd82202 add  .2610    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1309ddadd82203 add  .2650    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1310ddadd82204 add  .2651    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1311ddadd82207 add  .2660    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1312ddadd82208 add  .2670    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1313ddadd82209 add  .2699    12345678901234.00    ->  12345678901234.26  Inexact Rounded
1314ddadd82211 add -.2699   -12345678901234.00    -> -12345678901234.26  Inexact Rounded
1315
1316ddadd82300 add  .2900    12345678901234.00    ->  12345678901234.29  Rounded
1317ddadd82301 add  .2901    12345678901234.00    ->  12345678901234.29  Inexact Rounded
1318ddadd82302 add  .2910    12345678901234.00    ->  12345678901234.29  Inexact Rounded
1319ddadd82303 add  .2950    12345678901234.00    ->  12345678901234.29  Inexact Rounded
1320ddadd82304 add  .2951    12345678901234.00    ->  12345678901234.29  Inexact Rounded
1321ddadd82307 add  .2960    12345678901234.00    ->  12345678901234.29  Inexact Rounded
1322ddadd82308 add  .2970    12345678901234.00    ->  12345678901234.29  Inexact Rounded
1323ddadd82309 add  .2999    12345678901234.00    ->  12345678901234.29  Inexact Rounded
1324ddadd82311 add -.2999   -12345678901234.00    -> -12345678901234.29  Inexact Rounded
1325
1326-- Null tests
1327ddadd9990 add 10  # -> NaN Invalid_operation
1328ddadd9991 add  # 10 -> NaN Invalid_operation
1329