1------------------------------------------------------------------------
2-- dqSubtract.decTest -- decQuad subtraction                          --
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 decQuads only; all arguments are
23-- representable in a decQuad
24extended:    1
25clamp:       1
26precision:   34
27maxExponent: 6144
28minExponent: -6143
29rounding:    half_even
30
31-- [first group are 'quick confidence check']
32dqsub001 subtract  0   0  -> '0'
33dqsub002 subtract  1   1  -> '0'
34dqsub003 subtract  1   2  -> '-1'
35dqsub004 subtract  2   1  -> '1'
36dqsub005 subtract  2   2  -> '0'
37dqsub006 subtract  3   2  -> '1'
38dqsub007 subtract  2   3  -> '-1'
39
40dqsub011 subtract -0   0  -> '-0'
41dqsub012 subtract -1   1  -> '-2'
42dqsub013 subtract -1   2  -> '-3'
43dqsub014 subtract -2   1  -> '-3'
44dqsub015 subtract -2   2  -> '-4'
45dqsub016 subtract -3   2  -> '-5'
46dqsub017 subtract -2   3  -> '-5'
47
48dqsub021 subtract  0  -0  -> '0'
49dqsub022 subtract  1  -1  -> '2'
50dqsub023 subtract  1  -2  -> '3'
51dqsub024 subtract  2  -1  -> '3'
52dqsub025 subtract  2  -2  -> '4'
53dqsub026 subtract  3  -2  -> '5'
54dqsub027 subtract  2  -3  -> '5'
55
56dqsub030 subtract  11  1  -> 10
57dqsub031 subtract  10  1  ->  9
58dqsub032 subtract  9   1  ->  8
59dqsub033 subtract  1   1  ->  0
60dqsub034 subtract  0   1  -> -1
61dqsub035 subtract -1   1  -> -2
62dqsub036 subtract -9   1  -> -10
63dqsub037 subtract -10  1  -> -11
64dqsub038 subtract -11  1  -> -12
65
66dqsub040 subtract '5.75' '3.3'  -> '2.45'
67dqsub041 subtract '5'    '-3'   -> '8'
68dqsub042 subtract '-5'   '-3'   -> '-2'
69dqsub043 subtract '-7'   '2.5'  -> '-9.5'
70dqsub044 subtract '0.7'  '0.3'  -> '0.4'
71dqsub045 subtract '1.3'  '0.3'  -> '1.0'
72dqsub046 subtract '1.25' '1.25' -> '0.00'
73
74dqsub050 subtract '1.23456789'    '1.00000000' -> '0.23456789'
75dqsub051 subtract '1.23456789'    '1.00000089' -> '0.23456700'
76
77dqsub060 subtract '70'    '10000e+34' -> '-1.000000000000000000000000000000000E+38' Inexact Rounded
78dqsub061 subtract '700'    '10000e+34' -> '-1.000000000000000000000000000000000E+38' Inexact Rounded
79dqsub062 subtract '7000'    '10000e+34' -> '-9.999999999999999999999999999999999E+37' Inexact Rounded
80dqsub063 subtract '70000'    '10000e+34' -> '-9.999999999999999999999999999999993E+37' Rounded
81dqsub064 subtract '700000'    '10000e+34' -> '-9.999999999999999999999999999999930E+37' Rounded
82  -- symmetry:
83dqsub065 subtract '10000e+34'    '70' -> '1.000000000000000000000000000000000E+38' Inexact Rounded
84dqsub066 subtract '10000e+34'    '700' -> '1.000000000000000000000000000000000E+38' Inexact Rounded
85dqsub067 subtract '10000e+34'    '7000' -> '9.999999999999999999999999999999999E+37' Inexact Rounded
86dqsub068 subtract '10000e+34'    '70000' -> '9.999999999999999999999999999999993E+37' Rounded
87dqsub069 subtract '10000e+34'    '700000' -> '9.999999999999999999999999999999930E+37' Rounded
88
89  -- some of the next group are really constructor tests
90dqsub090 subtract '00.0'    '0.0'  -> '0.0'
91dqsub091 subtract '00.0'    '0.00' -> '0.00'
92dqsub092 subtract '0.00'    '00.0' -> '0.00'
93dqsub093 subtract '00.0'    '0.00' -> '0.00'
94dqsub094 subtract '0.00'    '00.0' -> '0.00'
95dqsub095 subtract '3'    '.3'   -> '2.7'
96dqsub096 subtract '3.'   '.3'   -> '2.7'
97dqsub097 subtract '3.0'  '.3'   -> '2.7'
98dqsub098 subtract '3.00' '.3'   -> '2.70'
99dqsub099 subtract '3'    '3'    -> '0'
100dqsub100 subtract '3'    '+3'   -> '0'
101dqsub101 subtract '3'    '-3'   -> '6'
102dqsub102 subtract '3'    '0.3'  -> '2.7'
103dqsub103 subtract '3.'   '0.3'  -> '2.7'
104dqsub104 subtract '3.0'  '0.3'  -> '2.7'
105dqsub105 subtract '3.00' '0.3'  -> '2.70'
106dqsub106 subtract '3'    '3.0'  -> '0.0'
107dqsub107 subtract '3'    '+3.0' -> '0.0'
108dqsub108 subtract '3'    '-3.0' -> '6.0'
109
110-- the above all from add; massaged and extended.  Now some new ones...
111-- [particularly important for comparisons]
112-- NB: -xE-8 below were non-exponents pre-ANSI X3-274, and -1E-7 or 0E-7
113-- with input rounding.
114dqsub120 subtract  '10.23456784'    '10.23456789'  -> '-5E-8'
115dqsub121 subtract  '10.23456785'    '10.23456789'  -> '-4E-8'
116dqsub122 subtract  '10.23456786'    '10.23456789'  -> '-3E-8'
117dqsub123 subtract  '10.23456787'    '10.23456789'  -> '-2E-8'
118dqsub124 subtract  '10.23456788'    '10.23456789'  -> '-1E-8'
119dqsub125 subtract  '10.23456789'    '10.23456789'  -> '0E-8'
120dqsub126 subtract  '10.23456790'    '10.23456789'  -> '1E-8'
121dqsub127 subtract  '10.23456791'    '10.23456789'  -> '2E-8'
122dqsub128 subtract  '10.23456792'    '10.23456789'  -> '3E-8'
123dqsub129 subtract  '10.23456793'    '10.23456789'  -> '4E-8'
124dqsub130 subtract  '10.23456794'    '10.23456789'  -> '5E-8'
125dqsub131 subtract  '10.23456781'    '10.23456786'  -> '-5E-8'
126dqsub132 subtract  '10.23456782'    '10.23456786'  -> '-4E-8'
127dqsub133 subtract  '10.23456783'    '10.23456786'  -> '-3E-8'
128dqsub134 subtract  '10.23456784'    '10.23456786'  -> '-2E-8'
129dqsub135 subtract  '10.23456785'    '10.23456786'  -> '-1E-8'
130dqsub136 subtract  '10.23456786'    '10.23456786'  -> '0E-8'
131dqsub137 subtract  '10.23456787'    '10.23456786'  -> '1E-8'
132dqsub138 subtract  '10.23456788'    '10.23456786'  -> '2E-8'
133dqsub139 subtract  '10.23456789'    '10.23456786'  -> '3E-8'
134dqsub140 subtract  '10.23456790'    '10.23456786'  -> '4E-8'
135dqsub141 subtract  '10.23456791'    '10.23456786'  -> '5E-8'
136dqsub142 subtract  '1'              '0.999999999'  -> '1E-9'
137dqsub143 subtract  '0.999999999'    '1'            -> '-1E-9'
138dqsub144 subtract  '-10.23456780'   '-10.23456786' -> '6E-8'
139dqsub145 subtract  '-10.23456790'   '-10.23456786' -> '-4E-8'
140dqsub146 subtract  '-10.23456791'   '-10.23456786' -> '-5E-8'
141
142-- additional scaled arithmetic tests [0.97 problem]
143dqsub160 subtract '0'     '.1'      -> '-0.1'
144dqsub161 subtract '00'    '.97983'  -> '-0.97983'
145dqsub162 subtract '0'     '.9'      -> '-0.9'
146dqsub163 subtract '0'     '0.102'   -> '-0.102'
147dqsub164 subtract '0'     '.4'      -> '-0.4'
148dqsub165 subtract '0'     '.307'    -> '-0.307'
149dqsub166 subtract '0'     '.43822'  -> '-0.43822'
150dqsub167 subtract '0'     '.911'    -> '-0.911'
151dqsub168 subtract '.0'    '.02'     -> '-0.02'
152dqsub169 subtract '00'    '.392'    -> '-0.392'
153dqsub170 subtract '0'     '.26'     -> '-0.26'
154dqsub171 subtract '0'     '0.51'    -> '-0.51'
155dqsub172 subtract '0'     '.2234'   -> '-0.2234'
156dqsub173 subtract '0'     '.2'      -> '-0.2'
157dqsub174 subtract '.0'    '.0008'   -> '-0.0008'
158-- 0. on left
159dqsub180 subtract '0.0'     '-.1'      -> '0.1'
160dqsub181 subtract '0.00'    '-.97983'  -> '0.97983'
161dqsub182 subtract '0.0'     '-.9'      -> '0.9'
162dqsub183 subtract '0.0'     '-0.102'   -> '0.102'
163dqsub184 subtract '0.0'     '-.4'      -> '0.4'
164dqsub185 subtract '0.0'     '-.307'    -> '0.307'
165dqsub186 subtract '0.0'     '-.43822'  -> '0.43822'
166dqsub187 subtract '0.0'     '-.911'    -> '0.911'
167dqsub188 subtract '0.0'     '-.02'     -> '0.02'
168dqsub189 subtract '0.00'    '-.392'    -> '0.392'
169dqsub190 subtract '0.0'     '-.26'     -> '0.26'
170dqsub191 subtract '0.0'     '-0.51'    -> '0.51'
171dqsub192 subtract '0.0'     '-.2234'   -> '0.2234'
172dqsub193 subtract '0.0'     '-.2'      -> '0.2'
173dqsub194 subtract '0.0'     '-.0008'   -> '0.0008'
174-- negatives of same
175dqsub200 subtract '0'     '-.1'      -> '0.1'
176dqsub201 subtract '00'    '-.97983'  -> '0.97983'
177dqsub202 subtract '0'     '-.9'      -> '0.9'
178dqsub203 subtract '0'     '-0.102'   -> '0.102'
179dqsub204 subtract '0'     '-.4'      -> '0.4'
180dqsub205 subtract '0'     '-.307'    -> '0.307'
181dqsub206 subtract '0'     '-.43822'  -> '0.43822'
182dqsub207 subtract '0'     '-.911'    -> '0.911'
183dqsub208 subtract '.0'    '-.02'     -> '0.02'
184dqsub209 subtract '00'    '-.392'    -> '0.392'
185dqsub210 subtract '0'     '-.26'     -> '0.26'
186dqsub211 subtract '0'     '-0.51'    -> '0.51'
187dqsub212 subtract '0'     '-.2234'   -> '0.2234'
188dqsub213 subtract '0'     '-.2'      -> '0.2'
189dqsub214 subtract '.0'    '-.0008'   -> '0.0008'
190
191-- more fixed, LHS swaps [really the same as testcases under add]
192dqsub220 subtract '-56267E-12' 0  -> '-5.6267E-8'
193dqsub221 subtract '-56267E-11' 0  -> '-5.6267E-7'
194dqsub222 subtract '-56267E-10' 0  -> '-0.0000056267'
195dqsub223 subtract '-56267E-9'  0  -> '-0.000056267'
196dqsub224 subtract '-56267E-8'  0  -> '-0.00056267'
197dqsub225 subtract '-56267E-7'  0  -> '-0.0056267'
198dqsub226 subtract '-56267E-6'  0  -> '-0.056267'
199dqsub227 subtract '-56267E-5'  0  -> '-0.56267'
200dqsub228 subtract '-56267E-2'  0  -> '-562.67'
201dqsub229 subtract '-56267E-1'  0  -> '-5626.7'
202dqsub230 subtract '-56267E-0'  0  -> '-56267'
203-- symmetry ...
204dqsub240 subtract 0 '-56267E-12'  -> '5.6267E-8'
205dqsub241 subtract 0 '-56267E-11'  -> '5.6267E-7'
206dqsub242 subtract 0 '-56267E-10'  -> '0.0000056267'
207dqsub243 subtract 0 '-56267E-9'   -> '0.000056267'
208dqsub244 subtract 0 '-56267E-8'   -> '0.00056267'
209dqsub245 subtract 0 '-56267E-7'   -> '0.0056267'
210dqsub246 subtract 0 '-56267E-6'   -> '0.056267'
211dqsub247 subtract 0 '-56267E-5'   -> '0.56267'
212dqsub248 subtract 0 '-56267E-2'   -> '562.67'
213dqsub249 subtract 0 '-56267E-1'   -> '5626.7'
214dqsub250 subtract 0 '-56267E-0'   -> '56267'
215
216-- now some more from the 'new' add
217dqsub301 subtract '1.23456789'  '1.00000000' -> '0.23456789'
218dqsub302 subtract '1.23456789'  '1.00000011' -> '0.23456778'
219
220-- some carrying effects
221dqsub321 subtract '0.9998'  '0.0000' -> '0.9998'
222dqsub322 subtract '0.9998'  '0.0001' -> '0.9997'
223dqsub323 subtract '0.9998'  '0.0002' -> '0.9996'
224dqsub324 subtract '0.9998'  '0.0003' -> '0.9995'
225dqsub325 subtract '0.9998'  '-0.0000' -> '0.9998'
226dqsub326 subtract '0.9998'  '-0.0001' -> '0.9999'
227dqsub327 subtract '0.9998'  '-0.0002' -> '1.0000'
228dqsub328 subtract '0.9998'  '-0.0003' -> '1.0001'
229
230-- internal boundaries
231dqsub346 subtract '10000e+9'  '7'   -> '9999999999993'
232dqsub347 subtract '10000e+9'  '70'   -> '9999999999930'
233dqsub348 subtract '10000e+9'  '700'   -> '9999999999300'
234dqsub349 subtract '10000e+9'  '7000'   -> '9999999993000'
235dqsub350 subtract '10000e+9'  '70000'   -> '9999999930000'
236dqsub351 subtract '10000e+9'  '700000'   -> '9999999300000'
237dqsub352 subtract '7' '10000e+9'   -> '-9999999999993'
238dqsub353 subtract '70' '10000e+9'   -> '-9999999999930'
239dqsub354 subtract '700' '10000e+9'   -> '-9999999999300'
240dqsub355 subtract '7000' '10000e+9'   -> '-9999999993000'
241dqsub356 subtract '70000' '10000e+9'   -> '-9999999930000'
242dqsub357 subtract '700000' '10000e+9'   -> '-9999999300000'
243
244-- zero preservation
245dqsub361 subtract 1 '0.0001' -> '0.9999'
246dqsub362 subtract 1 '0.00001' -> '0.99999'
247dqsub363 subtract 1 '0.000001' -> '0.999999'
248dqsub364 subtract 1 '0.0000000000000000000000000000000001' -> '0.9999999999999999999999999999999999'
249dqsub365 subtract 1 '0.00000000000000000000000000000000001' -> '1.000000000000000000000000000000000' Inexact Rounded
250dqsub366 subtract 1 '0.000000000000000000000000000000000001' -> '1.000000000000000000000000000000000' Inexact Rounded
251
252-- some funny zeros [in case of bad signum]
253dqsub370 subtract 1  0  -> 1
254dqsub371 subtract 1 0.  -> 1
255dqsub372 subtract 1  .0 -> 1.0
256dqsub373 subtract 1 0.0 -> 1.0
257dqsub374 subtract  0  1 -> -1
258dqsub375 subtract 0.  1 -> -1
259dqsub376 subtract  .0 1 -> -1.0
260dqsub377 subtract 0.0 1 -> -1.0
261
262-- leading 0 digit before round
263dqsub910 subtract -103519362 -51897955.3 -> -51621406.7
264dqsub911 subtract 159579.444 89827.5229 -> 69751.9211
265
266dqsub920 subtract 333.0000000000000000000000000123456 33.00000000000000000000000001234566 -> 299.9999999999999999999999999999999 Inexact Rounded
267dqsub921 subtract 333.0000000000000000000000000123456 33.00000000000000000000000001234565 -> 300.0000000000000000000000000000000 Inexact Rounded
268dqsub922 subtract 133.0000000000000000000000000123456 33.00000000000000000000000001234565 ->  99.99999999999999999999999999999995
269dqsub923 subtract 133.0000000000000000000000000123456 33.00000000000000000000000001234564 ->  99.99999999999999999999999999999996
270dqsub924 subtract 133.0000000000000000000000000123456 33.00000000000000000000000001234540 -> 100.0000000000000000000000000000002 Rounded
271dqsub925 subtract 133.0000000000000000000000000123456 43.00000000000000000000000001234560 ->  90.00000000000000000000000000000000
272dqsub926 subtract 133.0000000000000000000000000123456 43.00000000000000000000000001234561 ->  89.99999999999999999999999999999999
273dqsub927 subtract 133.0000000000000000000000000123456 43.00000000000000000000000001234566 ->  89.99999999999999999999999999999994
274dqsub928 subtract 101.0000000000000000000000000123456 91.00000000000000000000000001234566 ->   9.99999999999999999999999999999994
275dqsub929 subtract 101.0000000000000000000000000123456 99.00000000000000000000000001234566 ->   1.99999999999999999999999999999994
276
277-- more LHS swaps [were fixed]
278dqsub390 subtract '-56267E-10'   0 ->  '-0.0000056267'
279dqsub391 subtract '-56267E-6'    0 ->  '-0.056267'
280dqsub392 subtract '-56267E-5'    0 ->  '-0.56267'
281dqsub393 subtract '-56267E-4'    0 ->  '-5.6267'
282dqsub394 subtract '-56267E-3'    0 ->  '-56.267'
283dqsub395 subtract '-56267E-2'    0 ->  '-562.67'
284dqsub396 subtract '-56267E-1'    0 ->  '-5626.7'
285dqsub397 subtract '-56267E-0'    0 ->  '-56267'
286dqsub398 subtract '-5E-10'       0 ->  '-5E-10'
287dqsub399 subtract '-5E-7'        0 ->  '-5E-7'
288dqsub400 subtract '-5E-6'        0 ->  '-0.000005'
289dqsub401 subtract '-5E-5'        0 ->  '-0.00005'
290dqsub402 subtract '-5E-4'        0 ->  '-0.0005'
291dqsub403 subtract '-5E-1'        0 ->  '-0.5'
292dqsub404 subtract '-5E0'         0 ->  '-5'
293dqsub405 subtract '-5E1'         0 ->  '-50'
294dqsub406 subtract '-5E5'         0 ->  '-500000'
295dqsub407 subtract '-5E33'        0 ->  '-5000000000000000000000000000000000'
296dqsub408 subtract '-5E34'        0 ->  '-5.000000000000000000000000000000000E+34'  Rounded
297dqsub409 subtract '-5E35'        0 ->  '-5.000000000000000000000000000000000E+35'  Rounded
298dqsub410 subtract '-5E36'        0 ->  '-5.000000000000000000000000000000000E+36'  Rounded
299dqsub411 subtract '-5E100'       0 ->  '-5.000000000000000000000000000000000E+100' Rounded
300
301-- more RHS swaps [were fixed]
302dqsub420 subtract 0  '-56267E-10' ->  '0.0000056267'
303dqsub421 subtract 0  '-56267E-6'  ->  '0.056267'
304dqsub422 subtract 0  '-56267E-5'  ->  '0.56267'
305dqsub423 subtract 0  '-56267E-4'  ->  '5.6267'
306dqsub424 subtract 0  '-56267E-3'  ->  '56.267'
307dqsub425 subtract 0  '-56267E-2'  ->  '562.67'
308dqsub426 subtract 0  '-56267E-1'  ->  '5626.7'
309dqsub427 subtract 0  '-56267E-0'  ->  '56267'
310dqsub428 subtract 0  '-5E-10'     ->  '5E-10'
311dqsub429 subtract 0  '-5E-7'      ->  '5E-7'
312dqsub430 subtract 0  '-5E-6'      ->  '0.000005'
313dqsub431 subtract 0  '-5E-5'      ->  '0.00005'
314dqsub432 subtract 0  '-5E-4'      ->  '0.0005'
315dqsub433 subtract 0  '-5E-1'      ->  '0.5'
316dqsub434 subtract 0  '-5E0'       ->  '5'
317dqsub435 subtract 0  '-5E1'       ->  '50'
318dqsub436 subtract 0  '-5E5'       ->  '500000'
319dqsub437 subtract 0  '-5E33'      ->  '5000000000000000000000000000000000'
320dqsub438 subtract 0  '-5E34'      ->  '5.000000000000000000000000000000000E+34'   Rounded
321dqsub439 subtract 0  '-5E35'      ->  '5.000000000000000000000000000000000E+35'   Rounded
322dqsub440 subtract 0  '-5E36'      ->  '5.000000000000000000000000000000000E+36'   Rounded
323dqsub441 subtract 0  '-5E100'     ->  '5.000000000000000000000000000000000E+100'  Rounded
324
325
326-- try borderline precision, with carries, etc.
327dqsub461 subtract '1E+16' '1'        -> '9999999999999999'
328dqsub462 subtract '1E+12' '-1.111'   -> '1000000000001.111'
329dqsub463 subtract '1.111'  '-1E+12'  -> '1000000000001.111'
330dqsub464 subtract '-1'    '-1E+16'   -> '9999999999999999'
331dqsub465 subtract '7E+15' '1'        -> '6999999999999999'
332dqsub466 subtract '7E+12' '-1.111'   -> '7000000000001.111'
333dqsub467 subtract '1.111'  '-7E+12'  -> '7000000000001.111'
334dqsub468 subtract '-1'    '-7E+15'   -> '6999999999999999'
335
336--                   1234567890123456       1234567890123456      1 23456789012345
337dqsub470 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555563' -> '1.000000000000000000000000000000001' Inexact Rounded
338dqsub471 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555562' -> '1.000000000000000000000000000000001' Inexact Rounded
339dqsub472 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555561' -> '1.000000000000000000000000000000000' Inexact Rounded
340dqsub473 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555560' -> '1.000000000000000000000000000000000' Inexact Rounded
341dqsub474 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555559' -> '1.000000000000000000000000000000000' Inexact Rounded
342dqsub475 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555558' -> '1.000000000000000000000000000000000' Inexact Rounded
343dqsub476 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555557' -> '1.000000000000000000000000000000000' Inexact Rounded
344dqsub477 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555556' -> '1.000000000000000000000000000000000' Rounded
345dqsub478 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555555' -> '0.9999999999999999999999999999999999'
346dqsub479 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555554' -> '0.9999999999999999999999999999999998'
347dqsub480 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555553' -> '0.9999999999999999999999999999999997'
348dqsub481 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555552' -> '0.9999999999999999999999999999999996'
349dqsub482 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555551' -> '0.9999999999999999999999999999999995'
350dqsub483 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555550' -> '0.9999999999999999999999999999999994'
351
352-- and some more, including residue effects and different roundings
353rounding: half_up
354dqsub500 subtract '1231234555555555555555555567456789' 0             -> '1231234555555555555555555567456789'
355dqsub501 subtract '1231234555555555555555555567456789' 0.000000001   -> '1231234555555555555555555567456789' Inexact Rounded
356dqsub502 subtract '1231234555555555555555555567456789' 0.000001      -> '1231234555555555555555555567456789' Inexact Rounded
357dqsub503 subtract '1231234555555555555555555567456789' 0.1           -> '1231234555555555555555555567456789' Inexact Rounded
358dqsub504 subtract '1231234555555555555555555567456789' 0.4           -> '1231234555555555555555555567456789' Inexact Rounded
359dqsub505 subtract '1231234555555555555555555567456789' 0.49          -> '1231234555555555555555555567456789' Inexact Rounded
360dqsub506 subtract '1231234555555555555555555567456789' 0.499999      -> '1231234555555555555555555567456789' Inexact Rounded
361dqsub507 subtract '1231234555555555555555555567456789' 0.499999999   -> '1231234555555555555555555567456789' Inexact Rounded
362dqsub508 subtract '1231234555555555555555555567456789' 0.5           -> '1231234555555555555555555567456789' Inexact Rounded
363dqsub509 subtract '1231234555555555555555555567456789' 0.500000001   -> '1231234555555555555555555567456788' Inexact Rounded
364dqsub510 subtract '1231234555555555555555555567456789' 0.500001      -> '1231234555555555555555555567456788' Inexact Rounded
365dqsub511 subtract '1231234555555555555555555567456789' 0.51          -> '1231234555555555555555555567456788' Inexact Rounded
366dqsub512 subtract '1231234555555555555555555567456789' 0.6           -> '1231234555555555555555555567456788' Inexact Rounded
367dqsub513 subtract '1231234555555555555555555567456789' 0.9           -> '1231234555555555555555555567456788' Inexact Rounded
368dqsub514 subtract '1231234555555555555555555567456789' 0.99999       -> '1231234555555555555555555567456788' Inexact Rounded
369dqsub515 subtract '1231234555555555555555555567456789' 0.999999999   -> '1231234555555555555555555567456788' Inexact Rounded
370dqsub516 subtract '1231234555555555555555555567456789' 1             -> '1231234555555555555555555567456788'
371dqsub517 subtract '1231234555555555555555555567456789' 1.000000001   -> '1231234555555555555555555567456788' Inexact Rounded
372dqsub518 subtract '1231234555555555555555555567456789' 1.00001       -> '1231234555555555555555555567456788' Inexact Rounded
373dqsub519 subtract '1231234555555555555555555567456789' 1.1           -> '1231234555555555555555555567456788' Inexact Rounded
374
375rounding: half_even
376dqsub520 subtract '1231234555555555555555555567456789' 0             -> '1231234555555555555555555567456789'
377dqsub521 subtract '1231234555555555555555555567456789' 0.000000001   -> '1231234555555555555555555567456789' Inexact Rounded
378dqsub522 subtract '1231234555555555555555555567456789' 0.000001      -> '1231234555555555555555555567456789' Inexact Rounded
379dqsub523 subtract '1231234555555555555555555567456789' 0.1           -> '1231234555555555555555555567456789' Inexact Rounded
380dqsub524 subtract '1231234555555555555555555567456789' 0.4           -> '1231234555555555555555555567456789' Inexact Rounded
381dqsub525 subtract '1231234555555555555555555567456789' 0.49          -> '1231234555555555555555555567456789' Inexact Rounded
382dqsub526 subtract '1231234555555555555555555567456789' 0.499999      -> '1231234555555555555555555567456789' Inexact Rounded
383dqsub527 subtract '1231234555555555555555555567456789' 0.499999999   -> '1231234555555555555555555567456789' Inexact Rounded
384dqsub528 subtract '1231234555555555555555555567456789' 0.5           -> '1231234555555555555555555567456788' Inexact Rounded
385dqsub529 subtract '1231234555555555555555555567456789' 0.500000001   -> '1231234555555555555555555567456788' Inexact Rounded
386dqsub530 subtract '1231234555555555555555555567456789' 0.500001      -> '1231234555555555555555555567456788' Inexact Rounded
387dqsub531 subtract '1231234555555555555555555567456789' 0.51          -> '1231234555555555555555555567456788' Inexact Rounded
388dqsub532 subtract '1231234555555555555555555567456789' 0.6           -> '1231234555555555555555555567456788' Inexact Rounded
389dqsub533 subtract '1231234555555555555555555567456789' 0.9           -> '1231234555555555555555555567456788' Inexact Rounded
390dqsub534 subtract '1231234555555555555555555567456789' 0.99999       -> '1231234555555555555555555567456788' Inexact Rounded
391dqsub535 subtract '1231234555555555555555555567456789' 0.999999999   -> '1231234555555555555555555567456788' Inexact Rounded
392dqsub536 subtract '1231234555555555555555555567456789' 1             -> '1231234555555555555555555567456788'
393dqsub537 subtract '1231234555555555555555555567456789' 1.00000001    -> '1231234555555555555555555567456788' Inexact Rounded
394dqsub538 subtract '1231234555555555555555555567456789' 1.00001       -> '1231234555555555555555555567456788' Inexact Rounded
395dqsub539 subtract '1231234555555555555555555567456789' 1.1           -> '1231234555555555555555555567456788' Inexact Rounded
396-- critical few with even bottom digit...
397dqsub540 subtract '1231234555555555555555555567456788' 0.499999999   -> '1231234555555555555555555567456788' Inexact Rounded
398dqsub541 subtract '1231234555555555555555555567456788' 0.5           -> '1231234555555555555555555567456788' Inexact Rounded
399dqsub542 subtract '1231234555555555555555555567456788' 0.500000001   -> '1231234555555555555555555567456787' Inexact Rounded
400
401rounding: down
402dqsub550 subtract '1231234555555555555555555567456789' 0             -> '1231234555555555555555555567456789'
403dqsub551 subtract '1231234555555555555555555567456789' 0.000000001   -> '1231234555555555555555555567456788' Inexact Rounded
404dqsub552 subtract '1231234555555555555555555567456789' 0.000001      -> '1231234555555555555555555567456788' Inexact Rounded
405dqsub553 subtract '1231234555555555555555555567456789' 0.1           -> '1231234555555555555555555567456788' Inexact Rounded
406dqsub554 subtract '1231234555555555555555555567456789' 0.4           -> '1231234555555555555555555567456788' Inexact Rounded
407dqsub555 subtract '1231234555555555555555555567456789' 0.49          -> '1231234555555555555555555567456788' Inexact Rounded
408dqsub556 subtract '1231234555555555555555555567456789' 0.499999      -> '1231234555555555555555555567456788' Inexact Rounded
409dqsub557 subtract '1231234555555555555555555567456789' 0.499999999   -> '1231234555555555555555555567456788' Inexact Rounded
410dqsub558 subtract '1231234555555555555555555567456789' 0.5           -> '1231234555555555555555555567456788' Inexact Rounded
411dqsub559 subtract '1231234555555555555555555567456789' 0.500000001   -> '1231234555555555555555555567456788' Inexact Rounded
412dqsub560 subtract '1231234555555555555555555567456789' 0.500001      -> '1231234555555555555555555567456788' Inexact Rounded
413dqsub561 subtract '1231234555555555555555555567456789' 0.51          -> '1231234555555555555555555567456788' Inexact Rounded
414dqsub562 subtract '1231234555555555555555555567456789' 0.6           -> '1231234555555555555555555567456788' Inexact Rounded
415dqsub563 subtract '1231234555555555555555555567456789' 0.9           -> '1231234555555555555555555567456788' Inexact Rounded
416dqsub564 subtract '1231234555555555555555555567456789' 0.99999       -> '1231234555555555555555555567456788' Inexact Rounded
417dqsub565 subtract '1231234555555555555555555567456789' 0.999999999   -> '1231234555555555555555555567456788' Inexact Rounded
418dqsub566 subtract '1231234555555555555555555567456789' 1             -> '1231234555555555555555555567456788'
419dqsub567 subtract '1231234555555555555555555567456789' 1.00000001    -> '1231234555555555555555555567456787' Inexact Rounded
420dqsub568 subtract '1231234555555555555555555567456789' 1.00001       -> '1231234555555555555555555567456787' Inexact Rounded
421dqsub569 subtract '1231234555555555555555555567456789' 1.1           -> '1231234555555555555555555567456787' Inexact Rounded
422
423-- symmetry...
424rounding: half_up
425dqsub600 subtract 0             '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789'
426dqsub601 subtract 0.000000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
427dqsub602 subtract 0.000001      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
428dqsub603 subtract 0.1           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
429dqsub604 subtract 0.4           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
430dqsub605 subtract 0.49          '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
431dqsub606 subtract 0.499999      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
432dqsub607 subtract 0.499999999   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
433dqsub608 subtract 0.5           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
434dqsub609 subtract 0.500000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
435dqsub610 subtract 0.500001      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
436dqsub611 subtract 0.51          '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
437dqsub612 subtract 0.6           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
438dqsub613 subtract 0.9           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
439dqsub614 subtract 0.99999       '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
440dqsub615 subtract 0.999999999   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
441dqsub616 subtract 1             '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788'
442dqsub617 subtract 1.000000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
443dqsub618 subtract 1.00001       '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
444dqsub619 subtract 1.1           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
445
446rounding: half_even
447dqsub620 subtract 0             '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789'
448dqsub621 subtract 0.000000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
449dqsub622 subtract 0.000001      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
450dqsub623 subtract 0.1           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
451dqsub624 subtract 0.4           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
452dqsub625 subtract 0.49          '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
453dqsub626 subtract 0.499999      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
454dqsub627 subtract 0.499999999   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
455dqsub628 subtract 0.5           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
456dqsub629 subtract 0.500000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
457dqsub630 subtract 0.500001      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
458dqsub631 subtract 0.51          '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
459dqsub632 subtract 0.6           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
460dqsub633 subtract 0.9           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
461dqsub634 subtract 0.99999       '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
462dqsub635 subtract 0.999999999   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
463dqsub636 subtract 1             '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788'
464dqsub637 subtract 1.00000001    '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
465dqsub638 subtract 1.00001       '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
466dqsub639 subtract 1.1           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
467-- critical few with even bottom digit...
468dqsub640 subtract 0.499999999   '1231234555555555555555555567456788' -> '-1231234555555555555555555567456788' Inexact Rounded
469dqsub641 subtract 0.5           '1231234555555555555555555567456788' -> '-1231234555555555555555555567456788' Inexact Rounded
470dqsub642 subtract 0.500000001   '1231234555555555555555555567456788' -> '-1231234555555555555555555567456787' Inexact Rounded
471
472rounding: down
473dqsub650 subtract 0             '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789'
474dqsub651 subtract 0.000000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
475dqsub652 subtract 0.000001      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
476dqsub653 subtract 0.1           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
477dqsub654 subtract 0.4           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
478dqsub655 subtract 0.49          '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
479dqsub656 subtract 0.499999      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
480dqsub657 subtract 0.499999999   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
481dqsub658 subtract 0.5           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
482dqsub659 subtract 0.500000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
483dqsub660 subtract 0.500001      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
484dqsub661 subtract 0.51          '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
485dqsub662 subtract 0.6           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
486dqsub663 subtract 0.9           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
487dqsub664 subtract 0.99999       '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
488dqsub665 subtract 0.999999999   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
489dqsub666 subtract 1             '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788'
490dqsub667 subtract 1.00000001    '1231234555555555555555555567456789' -> '-1231234555555555555555555567456787' Inexact Rounded
491dqsub668 subtract 1.00001       '1231234555555555555555555567456789' -> '-1231234555555555555555555567456787' Inexact Rounded
492dqsub669 subtract 1.1           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456787' Inexact Rounded
493
494
495-- lots of leading zeros in intermediate result, and showing effects of
496-- input rounding would have affected the following
497rounding: half_up
498dqsub670 subtract '1234567456789' '1234567456788.1' -> 0.9
499dqsub671 subtract '1234567456789' '1234567456788.9' -> 0.1
500dqsub672 subtract '1234567456789' '1234567456789.1' -> -0.1
501dqsub673 subtract '1234567456789' '1234567456789.5' -> -0.5
502dqsub674 subtract '1234567456789' '1234567456789.9' -> -0.9
503
504rounding: half_even
505dqsub680 subtract '1234567456789' '1234567456788.1' -> 0.9
506dqsub681 subtract '1234567456789' '1234567456788.9' -> 0.1
507dqsub682 subtract '1234567456789' '1234567456789.1' -> -0.1
508dqsub683 subtract '1234567456789' '1234567456789.5' -> -0.5
509dqsub684 subtract '1234567456789' '1234567456789.9' -> -0.9
510
511dqsub685 subtract '1234567456788' '1234567456787.1' -> 0.9
512dqsub686 subtract '1234567456788' '1234567456787.9' -> 0.1
513dqsub687 subtract '1234567456788' '1234567456788.1' -> -0.1
514dqsub688 subtract '1234567456788' '1234567456788.5' -> -0.5
515dqsub689 subtract '1234567456788' '1234567456788.9' -> -0.9
516
517rounding: down
518dqsub690 subtract '1234567456789' '1234567456788.1' -> 0.9
519dqsub691 subtract '1234567456789' '1234567456788.9' -> 0.1
520dqsub692 subtract '1234567456789' '1234567456789.1' -> -0.1
521dqsub693 subtract '1234567456789' '1234567456789.5' -> -0.5
522dqsub694 subtract '1234567456789' '1234567456789.9' -> -0.9
523
524-- Specials
525dqsub780 subtract -Inf   Inf   -> -Infinity
526dqsub781 subtract -Inf   1000  -> -Infinity
527dqsub782 subtract -Inf   1     -> -Infinity
528dqsub783 subtract -Inf  -0     -> -Infinity
529dqsub784 subtract -Inf  -1     -> -Infinity
530dqsub785 subtract -Inf  -1000  -> -Infinity
531dqsub787 subtract -1000  Inf   -> -Infinity
532dqsub788 subtract -Inf   Inf   -> -Infinity
533dqsub789 subtract -1     Inf   -> -Infinity
534dqsub790 subtract  0     Inf   -> -Infinity
535dqsub791 subtract  1     Inf   -> -Infinity
536dqsub792 subtract  1000  Inf   -> -Infinity
537
538dqsub800 subtract  Inf   Inf   ->  NaN  Invalid_operation
539dqsub801 subtract  Inf   1000  ->  Infinity
540dqsub802 subtract  Inf   1     ->  Infinity
541dqsub803 subtract  Inf   0     ->  Infinity
542dqsub804 subtract  Inf  -0     ->  Infinity
543dqsub805 subtract  Inf  -1     ->  Infinity
544dqsub806 subtract  Inf  -1000  ->  Infinity
545dqsub807 subtract  Inf  -Inf   ->  Infinity
546dqsub808 subtract -1000 -Inf   ->  Infinity
547dqsub809 subtract -Inf  -Inf   ->  NaN  Invalid_operation
548dqsub810 subtract -1    -Inf   ->  Infinity
549dqsub811 subtract -0    -Inf   ->  Infinity
550dqsub812 subtract  0    -Inf   ->  Infinity
551dqsub813 subtract  1    -Inf   ->  Infinity
552dqsub814 subtract  1000 -Inf   ->  Infinity
553dqsub815 subtract  Inf  -Inf   ->  Infinity
554
555dqsub821 subtract  NaN   Inf   ->  NaN
556dqsub822 subtract -NaN   1000  -> -NaN
557dqsub823 subtract  NaN   1     ->  NaN
558dqsub824 subtract  NaN   0     ->  NaN
559dqsub825 subtract  NaN  -0     ->  NaN
560dqsub826 subtract  NaN  -1     ->  NaN
561dqsub827 subtract  NaN  -1000  ->  NaN
562dqsub828 subtract  NaN  -Inf   ->  NaN
563dqsub829 subtract -NaN   NaN   -> -NaN
564dqsub830 subtract -Inf   NaN   ->  NaN
565dqsub831 subtract -1000  NaN   ->  NaN
566dqsub832 subtract -1     NaN   ->  NaN
567dqsub833 subtract -0     NaN   ->  NaN
568dqsub834 subtract  0     NaN   ->  NaN
569dqsub835 subtract  1     NaN   ->  NaN
570dqsub836 subtract  1000 -NaN   -> -NaN
571dqsub837 subtract  Inf   NaN   ->  NaN
572
573dqsub841 subtract  sNaN  Inf   ->  NaN  Invalid_operation
574dqsub842 subtract -sNaN  1000  -> -NaN  Invalid_operation
575dqsub843 subtract  sNaN  1     ->  NaN  Invalid_operation
576dqsub844 subtract  sNaN  0     ->  NaN  Invalid_operation
577dqsub845 subtract  sNaN -0     ->  NaN  Invalid_operation
578dqsub846 subtract  sNaN -1     ->  NaN  Invalid_operation
579dqsub847 subtract  sNaN -1000  ->  NaN  Invalid_operation
580dqsub848 subtract  sNaN  NaN   ->  NaN  Invalid_operation
581dqsub849 subtract  sNaN sNaN   ->  NaN  Invalid_operation
582dqsub850 subtract  NaN  sNaN   ->  NaN  Invalid_operation
583dqsub851 subtract -Inf -sNaN   -> -NaN  Invalid_operation
584dqsub852 subtract -1000 sNaN   ->  NaN  Invalid_operation
585dqsub853 subtract -1    sNaN   ->  NaN  Invalid_operation
586dqsub854 subtract -0    sNaN   ->  NaN  Invalid_operation
587dqsub855 subtract  0    sNaN   ->  NaN  Invalid_operation
588dqsub856 subtract  1    sNaN   ->  NaN  Invalid_operation
589dqsub857 subtract  1000 sNaN   ->  NaN  Invalid_operation
590dqsub858 subtract  Inf  sNaN   ->  NaN  Invalid_operation
591dqsub859 subtract  NaN  sNaN   ->  NaN  Invalid_operation
592
593-- propagating NaNs
594dqsub861 subtract  NaN01   -Inf     ->  NaN1
595dqsub862 subtract -NaN02   -1000    -> -NaN2
596dqsub863 subtract  NaN03    1000    ->  NaN3
597dqsub864 subtract  NaN04    Inf     ->  NaN4
598dqsub865 subtract  NaN05    NaN61   ->  NaN5
599dqsub866 subtract -Inf     -NaN71   -> -NaN71
600dqsub867 subtract -1000     NaN81   ->  NaN81
601dqsub868 subtract  1000     NaN91   ->  NaN91
602dqsub869 subtract  Inf      NaN101  ->  NaN101
603dqsub871 subtract  sNaN011  -Inf    ->  NaN11  Invalid_operation
604dqsub872 subtract  sNaN012  -1000   ->  NaN12  Invalid_operation
605dqsub873 subtract -sNaN013   1000   -> -NaN13  Invalid_operation
606dqsub874 subtract  sNaN014   NaN171 ->  NaN14  Invalid_operation
607dqsub875 subtract  sNaN015  sNaN181 ->  NaN15  Invalid_operation
608dqsub876 subtract  NaN016   sNaN191 ->  NaN191 Invalid_operation
609dqsub877 subtract -Inf      sNaN201 ->  NaN201 Invalid_operation
610dqsub878 subtract -1000     sNaN211 ->  NaN211 Invalid_operation
611dqsub879 subtract  1000    -sNaN221 -> -NaN221 Invalid_operation
612dqsub880 subtract  Inf      sNaN231 ->  NaN231 Invalid_operation
613dqsub881 subtract  NaN025   sNaN241 ->  NaN241 Invalid_operation
614
615-- edge case spills
616dqsub901 subtract  2.E-3  1.002  -> -1.000
617dqsub902 subtract  2.0E-3  1.002  -> -1.0000
618dqsub903 subtract  2.00E-3  1.0020  -> -1.00000
619dqsub904 subtract  2.000E-3  1.00200  -> -1.000000
620dqsub905 subtract  2.0000E-3  1.002000  -> -1.0000000
621dqsub906 subtract  2.00000E-3  1.0020000  -> -1.00000000
622dqsub907 subtract  2.000000E-3  1.00200000  -> -1.000000000
623dqsub908 subtract  2.0000000E-3  1.002000000  -> -1.0000000000
624
625-- subnormals and overflows covered under Add
626
627-- Examples from SQL proposal (Krishna Kulkarni)
628dqsub1125  subtract 130E-2  120E-2 -> 0.10
629dqsub1126  subtract 130E-2  12E-1  -> 0.10
630dqsub1127  subtract 130E-2  1E0    -> 0.30
631dqsub1128  subtract 1E2     1E4    -> -9.9E+3
632
633-- Null tests
634dqsub9990 subtract 10  # -> NaN Invalid_operation
635dqsub9991 subtract  # 10 -> NaN Invalid_operation
636