1------------------------------------------------------------------------
2-- dqCompareTotal.decTest -- decQuad comparison using total ordering  --
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-- Note that we cannot assume add/subtract tests cover paths adequately,
23-- here, because the code might be quite different (comparison cannot
24-- overflow or underflow, so actual subtractions are not necessary).
25-- Similarly, comparetotal will have some radically different paths
26-- than compare.
27
28-- All operands and results are decQuads.
29extended:    1
30clamp:       1
31precision:   34
32maxExponent: 6144
33minExponent: -6143
34rounding:    half_even
35
36-- sanity checks
37dqcot001 comparetotal  -2  -2  -> 0
38dqcot002 comparetotal  -2  -1  -> -1
39dqcot003 comparetotal  -2   0  -> -1
40dqcot004 comparetotal  -2   1  -> -1
41dqcot005 comparetotal  -2   2  -> -1
42dqcot006 comparetotal  -1  -2  -> 1
43dqcot007 comparetotal  -1  -1  -> 0
44dqcot008 comparetotal  -1   0  -> -1
45dqcot009 comparetotal  -1   1  -> -1
46dqcot010 comparetotal  -1   2  -> -1
47dqcot011 comparetotal   0  -2  -> 1
48dqcot012 comparetotal   0  -1  -> 1
49dqcot013 comparetotal   0   0  -> 0
50dqcot014 comparetotal   0   1  -> -1
51dqcot015 comparetotal   0   2  -> -1
52dqcot016 comparetotal   1  -2  -> 1
53dqcot017 comparetotal   1  -1  -> 1
54dqcot018 comparetotal   1   0  -> 1
55dqcot019 comparetotal   1   1  -> 0
56dqcot020 comparetotal   1   2  -> -1
57dqcot021 comparetotal   2  -2  -> 1
58dqcot022 comparetotal   2  -1  -> 1
59dqcot023 comparetotal   2   0  -> 1
60dqcot025 comparetotal   2   1  -> 1
61dqcot026 comparetotal   2   2  -> 0
62
63dqcot031 comparetotal  -20  -20  -> 0
64dqcot032 comparetotal  -20  -10  -> -1
65dqcot033 comparetotal  -20   00  -> -1
66dqcot034 comparetotal  -20   10  -> -1
67dqcot035 comparetotal  -20   20  -> -1
68dqcot036 comparetotal  -10  -20  -> 1
69dqcot037 comparetotal  -10  -10  -> 0
70dqcot038 comparetotal  -10   00  -> -1
71dqcot039 comparetotal  -10   10  -> -1
72dqcot040 comparetotal  -10   20  -> -1
73dqcot041 comparetotal   00  -20  -> 1
74dqcot042 comparetotal   00  -10  -> 1
75dqcot043 comparetotal   00   00  -> 0
76dqcot044 comparetotal   00   10  -> -1
77dqcot045 comparetotal   00   20  -> -1
78dqcot046 comparetotal   10  -20  -> 1
79dqcot047 comparetotal   10  -10  -> 1
80dqcot048 comparetotal   10   00  -> 1
81dqcot049 comparetotal   10   10  -> 0
82dqcot050 comparetotal   10   20  -> -1
83dqcot051 comparetotal   20  -20  -> 1
84dqcot052 comparetotal   20  -10  -> 1
85dqcot053 comparetotal   20   00  -> 1
86dqcot055 comparetotal   20   10  -> 1
87dqcot056 comparetotal   20   20  -> 0
88
89dqcot061 comparetotal  -2.0  -2.0  -> 0
90dqcot062 comparetotal  -2.0  -1.0  -> -1
91dqcot063 comparetotal  -2.0   0.0  -> -1
92dqcot064 comparetotal  -2.0   1.0  -> -1
93dqcot065 comparetotal  -2.0   2.0  -> -1
94dqcot066 comparetotal  -1.0  -2.0  -> 1
95dqcot067 comparetotal  -1.0  -1.0  -> 0
96dqcot068 comparetotal  -1.0   0.0  -> -1
97dqcot069 comparetotal  -1.0   1.0  -> -1
98dqcot070 comparetotal  -1.0   2.0  -> -1
99dqcot071 comparetotal   0.0  -2.0  -> 1
100dqcot072 comparetotal   0.0  -1.0  -> 1
101dqcot073 comparetotal   0.0   0.0  -> 0
102dqcot074 comparetotal   0.0   1.0  -> -1
103dqcot075 comparetotal   0.0   2.0  -> -1
104dqcot076 comparetotal   1.0  -2.0  -> 1
105dqcot077 comparetotal   1.0  -1.0  -> 1
106dqcot078 comparetotal   1.0   0.0  -> 1
107dqcot079 comparetotal   1.0   1.0  -> 0
108dqcot080 comparetotal   1.0   2.0  -> -1
109dqcot081 comparetotal   2.0  -2.0  -> 1
110dqcot082 comparetotal   2.0  -1.0  -> 1
111dqcot083 comparetotal   2.0   0.0  -> 1
112dqcot085 comparetotal   2.0   1.0  -> 1
113dqcot086 comparetotal   2.0   2.0  -> 0
114
115-- now some cases which might overflow if subtract were used
116dqcot090 comparetotal  9.99999999999999999999999999999E+6144 9.99999999999999999999999999999E+6144  -> 0
117dqcot091 comparetotal -9.99999999999999999999999999999E+6144 9.99999999999999999999999999999E+6144  -> -1
118dqcot092 comparetotal  9.99999999999999999999999999999E+6144 -9.99999999999999999999999999999E+6144 -> 1
119dqcot093 comparetotal -9.99999999999999999999999999999E+6144 -9.99999999999999999999999999999E+6144 -> 0
120
121-- some differing length/exponent cases
122-- in this first group, compare would compare all equal
123dqcot100 comparetotal   7.0    7.0    -> 0
124dqcot101 comparetotal   7.0    7      -> -1
125dqcot102 comparetotal   7      7.0    -> 1
126dqcot103 comparetotal   7E+0   7.0    -> 1
127dqcot104 comparetotal   70E-1  7.0    -> 0
128dqcot105 comparetotal   0.7E+1 7      -> 0
129dqcot106 comparetotal   70E-1  7      -> -1
130dqcot107 comparetotal   7.0    7E+0   -> -1
131dqcot108 comparetotal   7.0    70E-1  -> 0
132dqcot109 comparetotal   7      0.7E+1 -> 0
133dqcot110 comparetotal   7      70E-1  -> 1
134
135dqcot120 comparetotal   8.0    7.0    -> 1
136dqcot121 comparetotal   8.0    7      -> 1
137dqcot122 comparetotal   8      7.0    -> 1
138dqcot123 comparetotal   8E+0   7.0    -> 1
139dqcot124 comparetotal   80E-1  7.0    -> 1
140dqcot125 comparetotal   0.8E+1 7      -> 1
141dqcot126 comparetotal   80E-1  7      -> 1
142dqcot127 comparetotal   8.0    7E+0   -> 1
143dqcot128 comparetotal   8.0    70E-1  -> 1
144dqcot129 comparetotal   8      0.7E+1  -> 1
145dqcot130 comparetotal   8      70E-1  -> 1
146
147dqcot140 comparetotal   8.0    9.0    -> -1
148dqcot141 comparetotal   8.0    9      -> -1
149dqcot142 comparetotal   8      9.0    -> -1
150dqcot143 comparetotal   8E+0   9.0    -> -1
151dqcot144 comparetotal   80E-1  9.0    -> -1
152dqcot145 comparetotal   0.8E+1 9      -> -1
153dqcot146 comparetotal   80E-1  9      -> -1
154dqcot147 comparetotal   8.0    9E+0   -> -1
155dqcot148 comparetotal   8.0    90E-1  -> -1
156dqcot149 comparetotal   8      0.9E+1 -> -1
157dqcot150 comparetotal   8      90E-1  -> -1
158
159-- and again, with sign changes -+ ..
160dqcot200 comparetotal  -7.0    7.0    -> -1
161dqcot201 comparetotal  -7.0    7      -> -1
162dqcot202 comparetotal  -7      7.0    -> -1
163dqcot203 comparetotal  -7E+0   7.0    -> -1
164dqcot204 comparetotal  -70E-1  7.0    -> -1
165dqcot205 comparetotal  -0.7E+1 7      -> -1
166dqcot206 comparetotal  -70E-1  7      -> -1
167dqcot207 comparetotal  -7.0    7E+0   -> -1
168dqcot208 comparetotal  -7.0    70E-1  -> -1
169dqcot209 comparetotal  -7      0.7E+1 -> -1
170dqcot210 comparetotal  -7      70E-1  -> -1
171
172dqcot220 comparetotal  -8.0    7.0    -> -1
173dqcot221 comparetotal  -8.0    7      -> -1
174dqcot222 comparetotal  -8      7.0    -> -1
175dqcot223 comparetotal  -8E+0   7.0    -> -1
176dqcot224 comparetotal  -80E-1  7.0    -> -1
177dqcot225 comparetotal  -0.8E+1 7      -> -1
178dqcot226 comparetotal  -80E-1  7      -> -1
179dqcot227 comparetotal  -8.0    7E+0   -> -1
180dqcot228 comparetotal  -8.0    70E-1  -> -1
181dqcot229 comparetotal  -8      0.7E+1 -> -1
182dqcot230 comparetotal  -8      70E-1  -> -1
183
184dqcot240 comparetotal  -8.0    9.0    -> -1
185dqcot241 comparetotal  -8.0    9      -> -1
186dqcot242 comparetotal  -8      9.0    -> -1
187dqcot243 comparetotal  -8E+0   9.0    -> -1
188dqcot244 comparetotal  -80E-1  9.0    -> -1
189dqcot245 comparetotal  -0.8E+1 9      -> -1
190dqcot246 comparetotal  -80E-1  9      -> -1
191dqcot247 comparetotal  -8.0    9E+0   -> -1
192dqcot248 comparetotal  -8.0    90E-1  -> -1
193dqcot249 comparetotal  -8      0.9E+1 -> -1
194dqcot250 comparetotal  -8      90E-1  -> -1
195
196-- and again, with sign changes +- ..
197dqcot300 comparetotal   7.0    -7.0    -> 1
198dqcot301 comparetotal   7.0    -7      -> 1
199dqcot302 comparetotal   7      -7.0    -> 1
200dqcot303 comparetotal   7E+0   -7.0    -> 1
201dqcot304 comparetotal   70E-1  -7.0    -> 1
202dqcot305 comparetotal   .7E+1  -7      -> 1
203dqcot306 comparetotal   70E-1  -7      -> 1
204dqcot307 comparetotal   7.0    -7E+0   -> 1
205dqcot308 comparetotal   7.0    -70E-1  -> 1
206dqcot309 comparetotal   7      -.7E+1  -> 1
207dqcot310 comparetotal   7      -70E-1  -> 1
208
209dqcot320 comparetotal   8.0    -7.0    -> 1
210dqcot321 comparetotal   8.0    -7      -> 1
211dqcot322 comparetotal   8      -7.0    -> 1
212dqcot323 comparetotal   8E+0   -7.0    -> 1
213dqcot324 comparetotal   80E-1  -7.0    -> 1
214dqcot325 comparetotal   .8E+1  -7      -> 1
215dqcot326 comparetotal   80E-1  -7      -> 1
216dqcot327 comparetotal   8.0    -7E+0   -> 1
217dqcot328 comparetotal   8.0    -70E-1  -> 1
218dqcot329 comparetotal   8      -.7E+1  -> 1
219dqcot330 comparetotal   8      -70E-1  -> 1
220
221dqcot340 comparetotal   8.0    -9.0    -> 1
222dqcot341 comparetotal   8.0    -9      -> 1
223dqcot342 comparetotal   8      -9.0    -> 1
224dqcot343 comparetotal   8E+0   -9.0    -> 1
225dqcot344 comparetotal   80E-1  -9.0    -> 1
226dqcot345 comparetotal   .8E+1  -9      -> 1
227dqcot346 comparetotal   80E-1  -9      -> 1
228dqcot347 comparetotal   8.0    -9E+0   -> 1
229dqcot348 comparetotal   8.0    -90E-1  -> 1
230dqcot349 comparetotal   8      -.9E+1  -> 1
231dqcot350 comparetotal   8      -90E-1  -> 1
232
233-- and again, with sign changes -- ..
234dqcot400 comparetotal   -7.0    -7.0    -> 0
235dqcot401 comparetotal   -7.0    -7      -> 1
236dqcot402 comparetotal   -7      -7.0    -> -1
237dqcot403 comparetotal   -7E+0   -7.0    -> -1
238dqcot404 comparetotal   -70E-1  -7.0    -> 0
239dqcot405 comparetotal   -.7E+1  -7      -> 0
240dqcot406 comparetotal   -70E-1  -7      -> 1
241dqcot407 comparetotal   -7.0    -7E+0   -> 1
242dqcot408 comparetotal   -7.0    -70E-1  -> 0
243dqcot409 comparetotal   -7      -.7E+1  -> 0
244dqcot410 comparetotal   -7      -70E-1  -> -1
245
246dqcot420 comparetotal   -8.0    -7.0    -> -1
247dqcot421 comparetotal   -8.0    -7      -> -1
248dqcot422 comparetotal   -8      -7.0    -> -1
249dqcot423 comparetotal   -8E+0   -7.0    -> -1
250dqcot424 comparetotal   -80E-1  -7.0    -> -1
251dqcot425 comparetotal   -.8E+1  -7      -> -1
252dqcot426 comparetotal   -80E-1  -7      -> -1
253dqcot427 comparetotal   -8.0    -7E+0   -> -1
254dqcot428 comparetotal   -8.0    -70E-1  -> -1
255dqcot429 comparetotal   -8      -.7E+1  -> -1
256dqcot430 comparetotal   -8      -70E-1  -> -1
257
258dqcot440 comparetotal   -8.0    -9.0    -> 1
259dqcot441 comparetotal   -8.0    -9      -> 1
260dqcot442 comparetotal   -8      -9.0    -> 1
261dqcot443 comparetotal   -8E+0   -9.0    -> 1
262dqcot444 comparetotal   -80E-1  -9.0    -> 1
263dqcot445 comparetotal   -.8E+1  -9      -> 1
264dqcot446 comparetotal   -80E-1  -9      -> 1
265dqcot447 comparetotal   -8.0    -9E+0   -> 1
266dqcot448 comparetotal   -8.0    -90E-1  -> 1
267dqcot449 comparetotal   -8      -.9E+1  -> 1
268dqcot450 comparetotal   -8      -90E-1  -> 1
269
270
271-- testcases that subtract to lots of zeros at boundaries [pgr]
272dqcot473 comparetotal 123.4560000000000E-89 123.456E-89 -> -1
273dqcot474 comparetotal 123.456000000000E+89 123.456E+89 -> -1
274dqcot475 comparetotal 123.45600000000E-89 123.456E-89 -> -1
275dqcot476 comparetotal 123.4560000000E+89 123.456E+89 -> -1
276dqcot477 comparetotal 123.456000000E-89 123.456E-89 -> -1
277dqcot478 comparetotal 123.45600000E+89 123.456E+89 -> -1
278dqcot479 comparetotal 123.4560000E-89 123.456E-89 -> -1
279dqcot480 comparetotal 123.456000E+89 123.456E+89 -> -1
280dqcot481 comparetotal 123.45600E-89 123.456E-89 -> -1
281dqcot482 comparetotal 123.4560E+89 123.456E+89 -> -1
282dqcot483 comparetotal 123.456E-89 123.456E-89 -> 0
283dqcot487 comparetotal 123.456E+89 123.4560000000000E+89 -> 1
284dqcot488 comparetotal 123.456E-89 123.456000000000E-89 -> 1
285dqcot489 comparetotal 123.456E+89 123.45600000000E+89 -> 1
286dqcot490 comparetotal 123.456E-89 123.4560000000E-89 -> 1
287dqcot491 comparetotal 123.456E+89 123.456000000E+89 -> 1
288dqcot492 comparetotal 123.456E-89 123.45600000E-89 -> 1
289dqcot493 comparetotal 123.456E+89 123.4560000E+89 -> 1
290dqcot494 comparetotal 123.456E-89 123.456000E-89 -> 1
291dqcot495 comparetotal 123.456E+89 123.45600E+89 -> 1
292dqcot496 comparetotal 123.456E-89 123.4560E-89 -> 1
293dqcot497 comparetotal 123.456E+89 123.456E+89 -> 0
294
295-- wide-ranging, around precision; signs equal
296dqcot498 comparetotal    1     1E-17    -> 1
297dqcot499 comparetotal    1     1E-16    -> 1
298dqcot500 comparetotal    1     1E-15    -> 1
299dqcot501 comparetotal    1     1E-14    -> 1
300dqcot502 comparetotal    1     1E-13    -> 1
301dqcot503 comparetotal    1     1E-12    -> 1
302dqcot504 comparetotal    1     1E-11    -> 1
303dqcot505 comparetotal    1     1E-10    -> 1
304dqcot506 comparetotal    1     1E-9     -> 1
305dqcot507 comparetotal    1     1E-8     -> 1
306dqcot508 comparetotal    1     1E-7     -> 1
307dqcot509 comparetotal    1     1E-6     -> 1
308dqcot510 comparetotal    1     1E-5     -> 1
309dqcot511 comparetotal    1     1E-4     -> 1
310dqcot512 comparetotal    1     1E-3     -> 1
311dqcot513 comparetotal    1     1E-2     -> 1
312dqcot514 comparetotal    1     1E-1     -> 1
313dqcot515 comparetotal    1     1E-0     -> 0
314dqcot516 comparetotal    1     1E+1     -> -1
315dqcot517 comparetotal    1     1E+2     -> -1
316dqcot518 comparetotal    1     1E+3     -> -1
317dqcot519 comparetotal    1     1E+4     -> -1
318dqcot521 comparetotal    1     1E+5     -> -1
319dqcot522 comparetotal    1     1E+6     -> -1
320dqcot523 comparetotal    1     1E+7     -> -1
321dqcot524 comparetotal    1     1E+8     -> -1
322dqcot525 comparetotal    1     1E+9     -> -1
323dqcot526 comparetotal    1     1E+10    -> -1
324dqcot527 comparetotal    1     1E+11    -> -1
325dqcot528 comparetotal    1     1E+12    -> -1
326dqcot529 comparetotal    1     1E+13    -> -1
327dqcot530 comparetotal    1     1E+14    -> -1
328dqcot531 comparetotal    1     1E+15    -> -1
329dqcot532 comparetotal    1     1E+16    -> -1
330dqcot533 comparetotal    1     1E+17    -> -1
331-- LR swap
332dqcot538 comparetotal    1E-17  1       -> -1
333dqcot539 comparetotal    1E-16  1       -> -1
334dqcot540 comparetotal    1E-15  1       -> -1
335dqcot541 comparetotal    1E-14  1       -> -1
336dqcot542 comparetotal    1E-13  1       -> -1
337dqcot543 comparetotal    1E-12  1       -> -1
338dqcot544 comparetotal    1E-11  1       -> -1
339dqcot545 comparetotal    1E-10  1       -> -1
340dqcot546 comparetotal    1E-9   1       -> -1
341dqcot547 comparetotal    1E-8   1       -> -1
342dqcot548 comparetotal    1E-7   1       -> -1
343dqcot549 comparetotal    1E-6   1       -> -1
344dqcot550 comparetotal    1E-5   1       -> -1
345dqcot551 comparetotal    1E-4   1       -> -1
346dqcot552 comparetotal    1E-3   1       -> -1
347dqcot553 comparetotal    1E-2   1       -> -1
348dqcot554 comparetotal    1E-1   1       -> -1
349dqcot555 comparetotal    1E-0   1       ->  0
350dqcot556 comparetotal    1E+1   1       ->  1
351dqcot557 comparetotal    1E+2   1       ->  1
352dqcot558 comparetotal    1E+3   1       ->  1
353dqcot559 comparetotal    1E+4   1       ->  1
354dqcot561 comparetotal    1E+5   1       ->  1
355dqcot562 comparetotal    1E+6   1       ->  1
356dqcot563 comparetotal    1E+7   1       ->  1
357dqcot564 comparetotal    1E+8   1       ->  1
358dqcot565 comparetotal    1E+9   1       ->  1
359dqcot566 comparetotal    1E+10  1       ->  1
360dqcot567 comparetotal    1E+11  1       ->  1
361dqcot568 comparetotal    1E+12  1       ->  1
362dqcot569 comparetotal    1E+13  1       ->  1
363dqcot570 comparetotal    1E+14  1       ->  1
364dqcot571 comparetotal    1E+15  1       ->  1
365dqcot572 comparetotal    1E+16  1       ->  1
366dqcot573 comparetotal    1E+17  1       ->  1
367-- similar with a useful coefficient, one side only
368dqcot578 comparetotal  0.000000987654321     1E-17    -> 1
369dqcot579 comparetotal  0.000000987654321     1E-16    -> 1
370dqcot580 comparetotal  0.000000987654321     1E-15    -> 1
371dqcot581 comparetotal  0.000000987654321     1E-14    -> 1
372dqcot582 comparetotal  0.000000987654321     1E-13    -> 1
373dqcot583 comparetotal  0.000000987654321     1E-12    -> 1
374dqcot584 comparetotal  0.000000987654321     1E-11    -> 1
375dqcot585 comparetotal  0.000000987654321     1E-10    -> 1
376dqcot586 comparetotal  0.000000987654321     1E-9     -> 1
377dqcot587 comparetotal  0.000000987654321     1E-8     -> 1
378dqcot588 comparetotal  0.000000987654321     1E-7     -> 1
379dqcot589 comparetotal  0.000000987654321     1E-6     -> -1
380dqcot590 comparetotal  0.000000987654321     1E-5     -> -1
381dqcot591 comparetotal  0.000000987654321     1E-4     -> -1
382dqcot592 comparetotal  0.000000987654321     1E-3     -> -1
383dqcot593 comparetotal  0.000000987654321     1E-2     -> -1
384dqcot594 comparetotal  0.000000987654321     1E-1     -> -1
385dqcot595 comparetotal  0.000000987654321     1E-0     -> -1
386dqcot596 comparetotal  0.000000987654321     1E+1     -> -1
387dqcot597 comparetotal  0.000000987654321     1E+2     -> -1
388dqcot598 comparetotal  0.000000987654321     1E+3     -> -1
389dqcot599 comparetotal  0.000000987654321     1E+4     -> -1
390
391-- check some unit-y traps
392dqcot600 comparetotal   12            12.2345 -> -1
393dqcot601 comparetotal   12.0          12.2345 -> -1
394dqcot602 comparetotal   12.00         12.2345 -> -1
395dqcot603 comparetotal   12.000        12.2345 -> -1
396dqcot604 comparetotal   12.0000       12.2345 -> -1
397dqcot605 comparetotal   12.00000      12.2345 -> -1
398dqcot606 comparetotal   12.000000     12.2345 -> -1
399dqcot607 comparetotal   12.0000000    12.2345 -> -1
400dqcot608 comparetotal   12.00000000   12.2345 -> -1
401dqcot609 comparetotal   12.000000000  12.2345 -> -1
402dqcot610 comparetotal   12.1234 12            ->  1
403dqcot611 comparetotal   12.1234 12.0          ->  1
404dqcot612 comparetotal   12.1234 12.00         ->  1
405dqcot613 comparetotal   12.1234 12.000        ->  1
406dqcot614 comparetotal   12.1234 12.0000       ->  1
407dqcot615 comparetotal   12.1234 12.00000      ->  1
408dqcot616 comparetotal   12.1234 12.000000     ->  1
409dqcot617 comparetotal   12.1234 12.0000000    ->  1
410dqcot618 comparetotal   12.1234 12.00000000   ->  1
411dqcot619 comparetotal   12.1234 12.000000000  ->  1
412dqcot620 comparetotal  -12           -12.2345 ->  1
413dqcot621 comparetotal  -12.0         -12.2345 ->  1
414dqcot622 comparetotal  -12.00        -12.2345 ->  1
415dqcot623 comparetotal  -12.000       -12.2345 ->  1
416dqcot624 comparetotal  -12.0000      -12.2345 ->  1
417dqcot625 comparetotal  -12.00000     -12.2345 ->  1
418dqcot626 comparetotal  -12.000000    -12.2345 ->  1
419dqcot627 comparetotal  -12.0000000   -12.2345 ->  1
420dqcot628 comparetotal  -12.00000000  -12.2345 ->  1
421dqcot629 comparetotal  -12.000000000 -12.2345 ->  1
422dqcot630 comparetotal  -12.1234 -12           -> -1
423dqcot631 comparetotal  -12.1234 -12.0         -> -1
424dqcot632 comparetotal  -12.1234 -12.00        -> -1
425dqcot633 comparetotal  -12.1234 -12.000       -> -1
426dqcot634 comparetotal  -12.1234 -12.0000      -> -1
427dqcot635 comparetotal  -12.1234 -12.00000     -> -1
428dqcot636 comparetotal  -12.1234 -12.000000    -> -1
429dqcot637 comparetotal  -12.1234 -12.0000000   -> -1
430dqcot638 comparetotal  -12.1234 -12.00000000  -> -1
431dqcot639 comparetotal  -12.1234 -12.000000000 -> -1
432
433-- extended zeros
434dqcot640 comparetotal   0     0   -> 0
435dqcot641 comparetotal   0    -0   -> 1
436dqcot642 comparetotal   0    -0.0 -> 1
437dqcot643 comparetotal   0     0.0 -> 1
438dqcot644 comparetotal  -0     0   -> -1
439dqcot645 comparetotal  -0    -0   -> 0
440dqcot646 comparetotal  -0    -0.0 -> -1
441dqcot647 comparetotal  -0     0.0 -> -1
442dqcot648 comparetotal   0.0   0   -> -1
443dqcot649 comparetotal   0.0  -0   -> 1
444dqcot650 comparetotal   0.0  -0.0 -> 1
445dqcot651 comparetotal   0.0   0.0 -> 0
446dqcot652 comparetotal  -0.0   0   -> -1
447dqcot653 comparetotal  -0.0  -0   -> 1
448dqcot654 comparetotal  -0.0  -0.0 -> 0
449dqcot655 comparetotal  -0.0   0.0 -> -1
450
451dqcot656 comparetotal  -0E1   0.0 -> -1
452dqcot657 comparetotal  -0E2   0.0 -> -1
453dqcot658 comparetotal   0E1   0.0 -> 1
454dqcot659 comparetotal   0E2   0.0 -> 1
455dqcot660 comparetotal  -0E1   0   -> -1
456dqcot661 comparetotal  -0E2   0   -> -1
457dqcot662 comparetotal   0E1   0   -> 1
458dqcot663 comparetotal   0E2   0   -> 1
459dqcot664 comparetotal  -0E1  -0E1 -> 0
460dqcot665 comparetotal  -0E2  -0E1 -> -1
461dqcot666 comparetotal   0E1  -0E1 -> 1
462dqcot667 comparetotal   0E2  -0E1 -> 1
463dqcot668 comparetotal  -0E1  -0E2 -> 1
464dqcot669 comparetotal  -0E2  -0E2 -> 0
465dqcot670 comparetotal   0E1  -0E2 -> 1
466dqcot671 comparetotal   0E2  -0E2 -> 1
467dqcot672 comparetotal  -0E1   0E1 -> -1
468dqcot673 comparetotal  -0E2   0E1 -> -1
469dqcot674 comparetotal   0E1   0E1 -> 0
470dqcot675 comparetotal   0E2   0E1 -> 1
471dqcot676 comparetotal  -0E1   0E2 -> -1
472dqcot677 comparetotal  -0E2   0E2 -> -1
473dqcot678 comparetotal   0E1   0E2 -> -1
474dqcot679 comparetotal   0E2   0E2 -> 0
475
476-- trailing zeros; unit-y
477dqcot680 comparetotal   12    12           -> 0
478dqcot681 comparetotal   12    12.0         -> 1
479dqcot682 comparetotal   12    12.00        -> 1
480dqcot683 comparetotal   12    12.000       -> 1
481dqcot684 comparetotal   12    12.0000      -> 1
482dqcot685 comparetotal   12    12.00000     -> 1
483dqcot686 comparetotal   12    12.000000    -> 1
484dqcot687 comparetotal   12    12.0000000   -> 1
485dqcot688 comparetotal   12    12.00000000  -> 1
486dqcot689 comparetotal   12    12.000000000 -> 1
487dqcot690 comparetotal   12              12 -> 0
488dqcot691 comparetotal   12.0            12 -> -1
489dqcot692 comparetotal   12.00           12 -> -1
490dqcot693 comparetotal   12.000          12 -> -1
491dqcot694 comparetotal   12.0000         12 -> -1
492dqcot695 comparetotal   12.00000        12 -> -1
493dqcot696 comparetotal   12.000000       12 -> -1
494dqcot697 comparetotal   12.0000000      12 -> -1
495dqcot698 comparetotal   12.00000000     12 -> -1
496dqcot699 comparetotal   12.000000000    12 -> -1
497
498-- old long operand checks
499dqcot701 comparetotal 12345678000  1 ->  1
500dqcot702 comparetotal 1 12345678000  -> -1
501dqcot703 comparetotal 1234567800   1 ->  1
502dqcot704 comparetotal 1 1234567800   -> -1
503dqcot705 comparetotal 1234567890   1 ->  1
504dqcot706 comparetotal 1 1234567890   -> -1
505dqcot707 comparetotal 1234567891   1 ->  1
506dqcot708 comparetotal 1 1234567891   -> -1
507dqcot709 comparetotal 12345678901  1 ->  1
508dqcot710 comparetotal 1 12345678901  -> -1
509dqcot711 comparetotal 1234567896   1 ->  1
510dqcot712 comparetotal 1 1234567896   -> -1
511dqcot713 comparetotal -1234567891  1 -> -1
512dqcot714 comparetotal 1 -1234567891  ->  1
513dqcot715 comparetotal -12345678901 1 -> -1
514dqcot716 comparetotal 1 -12345678901 ->  1
515dqcot717 comparetotal -1234567896  1 -> -1
516dqcot718 comparetotal 1 -1234567896  ->  1
517
518-- old residue cases
519dqcot740 comparetotal  1  0.9999999  -> 1
520dqcot741 comparetotal  1  0.999999   -> 1
521dqcot742 comparetotal  1  0.99999    -> 1
522dqcot743 comparetotal  1  1.0000     -> 1
523dqcot744 comparetotal  1  1.00001    -> -1
524dqcot745 comparetotal  1  1.000001   -> -1
525dqcot746 comparetotal  1  1.0000001  -> -1
526dqcot750 comparetotal  0.9999999  1  -> -1
527dqcot751 comparetotal  0.999999   1  -> -1
528dqcot752 comparetotal  0.99999    1  -> -1
529dqcot753 comparetotal  1.0000     1  -> -1
530dqcot754 comparetotal  1.00001    1  -> 1
531dqcot755 comparetotal  1.000001   1  -> 1
532dqcot756 comparetotal  1.0000001  1  -> 1
533
534-- Specials
535dqcot780 comparetotal  Inf  -Inf   ->  1
536dqcot781 comparetotal  Inf  -1000  ->  1
537dqcot782 comparetotal  Inf  -1     ->  1
538dqcot783 comparetotal  Inf  -0     ->  1
539dqcot784 comparetotal  Inf   0     ->  1
540dqcot785 comparetotal  Inf   1     ->  1
541dqcot786 comparetotal  Inf   1000  ->  1
542dqcot787 comparetotal  Inf   Inf   ->  0
543dqcot788 comparetotal -1000  Inf   -> -1
544dqcot789 comparetotal -Inf   Inf   -> -1
545dqcot790 comparetotal -1     Inf   -> -1
546dqcot791 comparetotal -0     Inf   -> -1
547dqcot792 comparetotal  0     Inf   -> -1
548dqcot793 comparetotal  1     Inf   -> -1
549dqcot794 comparetotal  1000  Inf   -> -1
550dqcot795 comparetotal  Inf   Inf   ->  0
551
552dqcot800 comparetotal -Inf  -Inf   ->  0
553dqcot801 comparetotal -Inf  -1000  -> -1
554dqcot802 comparetotal -Inf  -1     -> -1
555dqcot803 comparetotal -Inf  -0     -> -1
556dqcot804 comparetotal -Inf   0     -> -1
557dqcot805 comparetotal -Inf   1     -> -1
558dqcot806 comparetotal -Inf   1000  -> -1
559dqcot807 comparetotal -Inf   Inf   -> -1
560dqcot808 comparetotal -Inf  -Inf   ->  0
561dqcot809 comparetotal -1000 -Inf   ->  1
562dqcot810 comparetotal -1    -Inf   ->  1
563dqcot811 comparetotal -0    -Inf   ->  1
564dqcot812 comparetotal  0    -Inf   ->  1
565dqcot813 comparetotal  1    -Inf   ->  1
566dqcot814 comparetotal  1000 -Inf   ->  1
567dqcot815 comparetotal  Inf  -Inf   ->  1
568
569dqcot821 comparetotal  NaN -Inf    ->  1
570dqcot822 comparetotal  NaN -1000   ->  1
571dqcot823 comparetotal  NaN -1      ->  1
572dqcot824 comparetotal  NaN -0      ->  1
573dqcot825 comparetotal  NaN  0      ->  1
574dqcot826 comparetotal  NaN  1      ->  1
575dqcot827 comparetotal  NaN  1000   ->  1
576dqcot828 comparetotal  NaN  Inf    ->  1
577dqcot829 comparetotal  NaN  NaN    ->  0
578dqcot830 comparetotal -Inf  NaN    ->  -1
579dqcot831 comparetotal -1000 NaN    ->  -1
580dqcot832 comparetotal -1    NaN    ->  -1
581dqcot833 comparetotal -0    NaN    ->  -1
582dqcot834 comparetotal  0    NaN    ->  -1
583dqcot835 comparetotal  1    NaN    ->  -1
584dqcot836 comparetotal  1000 NaN    ->  -1
585dqcot837 comparetotal  Inf  NaN    ->  -1
586dqcot838 comparetotal -NaN -NaN    ->  0
587dqcot839 comparetotal +NaN -NaN    ->  1
588dqcot840 comparetotal -NaN +NaN    ->  -1
589
590dqcot841 comparetotal  sNaN -sNaN  ->  1
591dqcot842 comparetotal  sNaN -NaN   ->  1
592dqcot843 comparetotal  sNaN -Inf   ->  1
593dqcot844 comparetotal  sNaN -1000  ->  1
594dqcot845 comparetotal  sNaN -1     ->  1
595dqcot846 comparetotal  sNaN -0     ->  1
596dqcot847 comparetotal  sNaN  0     ->  1
597dqcot848 comparetotal  sNaN  1     ->  1
598dqcot849 comparetotal  sNaN  1000  ->  1
599dqcot850 comparetotal  sNaN  NaN   ->  -1
600dqcot851 comparetotal  sNaN sNaN   ->  0
601
602dqcot852 comparetotal -sNaN sNaN   ->  -1
603dqcot853 comparetotal -NaN  sNaN   ->  -1
604dqcot854 comparetotal -Inf  sNaN   ->  -1
605dqcot855 comparetotal -1000 sNaN   ->  -1
606dqcot856 comparetotal -1    sNaN   ->  -1
607dqcot857 comparetotal -0    sNaN   ->  -1
608dqcot858 comparetotal  0    sNaN   ->  -1
609dqcot859 comparetotal  1    sNaN   ->  -1
610dqcot860 comparetotal  1000 sNaN   ->  -1
611dqcot861 comparetotal  Inf  sNaN   ->  -1
612dqcot862 comparetotal  NaN  sNaN   ->  1
613dqcot863 comparetotal  sNaN sNaN   ->  0
614
615dqcot871 comparetotal  -sNaN -sNaN  ->  0
616dqcot872 comparetotal  -sNaN -NaN   ->  1
617dqcot873 comparetotal  -sNaN -Inf   ->  -1
618dqcot874 comparetotal  -sNaN -1000  ->  -1
619dqcot875 comparetotal  -sNaN -1     ->  -1
620dqcot876 comparetotal  -sNaN -0     ->  -1
621dqcot877 comparetotal  -sNaN  0     ->  -1
622dqcot878 comparetotal  -sNaN  1     ->  -1
623dqcot879 comparetotal  -sNaN  1000  ->  -1
624dqcot880 comparetotal  -sNaN  NaN   ->  -1
625dqcot881 comparetotal  -sNaN sNaN   ->  -1
626
627dqcot882 comparetotal -sNaN -sNaN   ->  0
628dqcot883 comparetotal -NaN  -sNaN   ->  -1
629dqcot884 comparetotal -Inf  -sNaN   ->  1
630dqcot885 comparetotal -1000 -sNaN   ->  1
631dqcot886 comparetotal -1    -sNaN   ->  1
632dqcot887 comparetotal -0    -sNaN   ->  1
633dqcot888 comparetotal  0    -sNaN   ->  1
634dqcot889 comparetotal  1    -sNaN   ->  1
635dqcot890 comparetotal  1000 -sNaN   ->  1
636dqcot891 comparetotal  Inf  -sNaN   ->  1
637dqcot892 comparetotal  NaN  -sNaN   ->  1
638dqcot893 comparetotal  sNaN -sNaN   ->  1
639
640-- NaNs with payload
641dqcot960 comparetotal  NaN9 -Inf   ->  1
642dqcot961 comparetotal  NaN8  999   ->  1
643dqcot962 comparetotal  NaN77 Inf   ->  1
644dqcot963 comparetotal -NaN67 NaN5  ->  -1
645dqcot964 comparetotal -Inf  -NaN4  ->  1
646dqcot965 comparetotal -999  -NaN33 ->  1
647dqcot966 comparetotal  Inf   NaN2  ->  -1
648
649dqcot970 comparetotal -NaN41 -NaN42 -> 1
650dqcot971 comparetotal +NaN41 -NaN42 -> 1
651dqcot972 comparetotal -NaN41 +NaN42 -> -1
652dqcot973 comparetotal +NaN41 +NaN42 -> -1
653dqcot974 comparetotal -NaN42 -NaN01 -> -1
654dqcot975 comparetotal +NaN42 -NaN01 ->  1
655dqcot976 comparetotal -NaN42 +NaN01 -> -1
656dqcot977 comparetotal +NaN42 +NaN01 ->  1
657
658dqcot980 comparetotal -sNaN771 -sNaN772 -> 1
659dqcot981 comparetotal +sNaN771 -sNaN772 -> 1
660dqcot982 comparetotal -sNaN771 +sNaN772 -> -1
661dqcot983 comparetotal +sNaN771 +sNaN772 -> -1
662dqcot984 comparetotal -sNaN772 -sNaN771 -> -1
663dqcot985 comparetotal +sNaN772 -sNaN771 ->  1
664dqcot986 comparetotal -sNaN772 +sNaN771 -> -1
665dqcot987 comparetotal +sNaN772 +sNaN771 ->  1
666
667dqcot991 comparetotal -sNaN99 -Inf    -> -1
668dqcot992 comparetotal  sNaN98 -11     ->  1
669dqcot993 comparetotal  sNaN97  NaN    -> -1
670dqcot994 comparetotal  sNaN16 sNaN94  -> -1
671dqcot995 comparetotal  NaN85  sNaN83  ->  1
672dqcot996 comparetotal -Inf    sNaN92  -> -1
673dqcot997 comparetotal  088    sNaN81  -> -1
674dqcot998 comparetotal  Inf    sNaN90  -> -1
675dqcot999 comparetotal  NaN   -sNaN89  ->  1
676
677-- spread zeros
678dqcot1110 comparetotal   0E-6143  0       -> -1
679dqcot1111 comparetotal   0E-6143 -0       ->  1
680dqcot1112 comparetotal  -0E-6143  0       -> -1
681dqcot1113 comparetotal  -0E-6143 -0       ->  1
682dqcot1114 comparetotal   0E-6143  0E+6144  -> -1
683dqcot1115 comparetotal   0E-6143 -0E+6144  ->  1
684dqcot1116 comparetotal  -0E-6143  0E+6144  -> -1
685dqcot1117 comparetotal  -0E-6143 -0E+6144  ->  1
686dqcot1118 comparetotal   0       0E+6144  -> -1
687dqcot1119 comparetotal   0      -0E+6144  ->  1
688dqcot1120 comparetotal  -0       0E+6144  -> -1
689dqcot1121 comparetotal  -0      -0E+6144  ->  1
690
691dqcot1130 comparetotal   0E+6144  0       ->  1
692dqcot1131 comparetotal   0E+6144 -0       ->  1
693dqcot1132 comparetotal  -0E+6144  0       -> -1
694dqcot1133 comparetotal  -0E+6144 -0       -> -1
695dqcot1134 comparetotal   0E+6144  0E-6143  ->  1
696dqcot1135 comparetotal   0E+6144 -0E-6143  ->  1
697dqcot1136 comparetotal  -0E+6144  0E-6143  -> -1
698dqcot1137 comparetotal  -0E+6144 -0E-6143  -> -1
699dqcot1138 comparetotal   0       0E-6143  ->  1
700dqcot1139 comparetotal   0      -0E-6143  ->  1
701dqcot1140 comparetotal  -0       0E-6143  -> -1
702dqcot1141 comparetotal  -0      -0E-6143  -> -1
703
704-- Null tests
705dqcot9990 comparetotal 10  # -> NaN Invalid_operation
706dqcot9991 comparetotal  # 10 -> NaN Invalid_operation
707