1------------------------------------------------------------------------
2-- dqCompareTotalMag.decTest -- decQuad comparison; abs. total order  --
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
37dqctm001 comparetotmag  -2  -2   ->   0
38dqctm002 comparetotmag  -2  -1   ->   1
39dqctm003 comparetotmag  -2   0   ->   1
40dqctm004 comparetotmag  -2   1   ->   1
41dqctm005 comparetotmag  -2   2   ->   0
42dqctm006 comparetotmag  -1  -2   ->  -1
43dqctm007 comparetotmag  -1  -1   ->   0
44dqctm008 comparetotmag  -1   0   ->   1
45dqctm009 comparetotmag  -1   1   ->   0
46dqctm010 comparetotmag  -1   2   ->  -1
47dqctm011 comparetotmag   0  -2   ->  -1
48dqctm012 comparetotmag   0  -1   ->  -1
49dqctm013 comparetotmag   0   0   ->   0
50dqctm014 comparetotmag   0   1   ->  -1
51dqctm015 comparetotmag   0   2   ->  -1
52dqctm016 comparetotmag   1  -2   ->  -1
53dqctm017 comparetotmag   1  -1   ->   0
54dqctm018 comparetotmag   1   0   ->   1
55dqctm019 comparetotmag   1   1   ->   0
56dqctm020 comparetotmag   1   2   ->  -1
57dqctm021 comparetotmag   2  -2   ->   0
58dqctm022 comparetotmag   2  -1   ->   1
59dqctm023 comparetotmag   2   0   ->   1
60dqctm025 comparetotmag   2   1   ->   1
61dqctm026 comparetotmag   2   2   ->   0
62
63dqctm031 comparetotmag  -20  -20   ->   0
64dqctm032 comparetotmag  -20  -10   ->   1
65dqctm033 comparetotmag  -20   00   ->   1
66dqctm034 comparetotmag  -20   10   ->   1
67dqctm035 comparetotmag  -20   20   ->   0
68dqctm036 comparetotmag  -10  -20   ->  -1
69dqctm037 comparetotmag  -10  -10   ->   0
70dqctm038 comparetotmag  -10   00   ->   1
71dqctm039 comparetotmag  -10   10   ->   0
72dqctm040 comparetotmag  -10   20   ->  -1
73dqctm041 comparetotmag   00  -20   ->  -1
74dqctm042 comparetotmag   00  -10   ->  -1
75dqctm043 comparetotmag   00   00   ->   0
76dqctm044 comparetotmag   00   10   ->  -1
77dqctm045 comparetotmag   00   20   ->  -1
78dqctm046 comparetotmag   10  -20   ->  -1
79dqctm047 comparetotmag   10  -10   ->   0
80dqctm048 comparetotmag   10   00   ->   1
81dqctm049 comparetotmag   10   10   ->   0
82dqctm050 comparetotmag   10   20   ->  -1
83dqctm051 comparetotmag   20  -20   ->   0
84dqctm052 comparetotmag   20  -10   ->   1
85dqctm053 comparetotmag   20   00   ->   1
86dqctm055 comparetotmag   20   10   ->   1
87dqctm056 comparetotmag   20   20   ->   0
88
89dqctm061 comparetotmag  -2.0  -2.0   ->   0
90dqctm062 comparetotmag  -2.0  -1.0   ->   1
91dqctm063 comparetotmag  -2.0   0.0   ->   1
92dqctm064 comparetotmag  -2.0   1.0   ->   1
93dqctm065 comparetotmag  -2.0   2.0   ->   0
94dqctm066 comparetotmag  -1.0  -2.0   ->  -1
95dqctm067 comparetotmag  -1.0  -1.0   ->   0
96dqctm068 comparetotmag  -1.0   0.0   ->   1
97dqctm069 comparetotmag  -1.0   1.0   ->   0
98dqctm070 comparetotmag  -1.0   2.0   ->  -1
99dqctm071 comparetotmag   0.0  -2.0   ->  -1
100dqctm072 comparetotmag   0.0  -1.0   ->  -1
101dqctm073 comparetotmag   0.0   0.0   ->   0
102dqctm074 comparetotmag   0.0   1.0   ->  -1
103dqctm075 comparetotmag   0.0   2.0   ->  -1
104dqctm076 comparetotmag   1.0  -2.0   ->  -1
105dqctm077 comparetotmag   1.0  -1.0   ->   0
106dqctm078 comparetotmag   1.0   0.0   ->   1
107dqctm079 comparetotmag   1.0   1.0   ->   0
108dqctm080 comparetotmag   1.0   2.0   ->  -1
109dqctm081 comparetotmag   2.0  -2.0   ->   0
110dqctm082 comparetotmag   2.0  -1.0   ->   1
111dqctm083 comparetotmag   2.0   0.0   ->   1
112dqctm085 comparetotmag   2.0   1.0   ->   1
113dqctm086 comparetotmag   2.0   2.0   ->   0
114
115-- now some cases which might overflow if subtract were used
116dqctm090 comparetotmag  9.99999999999999999999999999999E+6144 9.99999999999999999999999999999E+6144   ->   0
117dqctm091 comparetotmag -9.99999999999999999999999999999E+6144 9.99999999999999999999999999999E+6144   ->   0
118dqctm092 comparetotmag  9.99999999999999999999999999999E+6144 -9.99999999999999999999999999999E+6144  ->   0
119dqctm093 comparetotmag -9.99999999999999999999999999999E+6144 -9.99999999999999999999999999999E+6144  ->   0
120
121-- some differing length/exponent cases
122-- in this first group, compare would compare all equal
123dqctm100 comparetotmag   7.0    7.0     ->   0
124dqctm101 comparetotmag   7.0    7       ->  -1
125dqctm102 comparetotmag   7      7.0     ->   1
126dqctm103 comparetotmag   7E+0   7.0     ->   1
127dqctm104 comparetotmag   70E-1  7.0     ->   0
128dqctm105 comparetotmag   0.7E+1 7       ->   0
129dqctm106 comparetotmag   70E-1  7       ->  -1
130dqctm107 comparetotmag   7.0    7E+0    ->  -1
131dqctm108 comparetotmag   7.0    70E-1   ->   0
132dqctm109 comparetotmag   7      0.7E+1  ->   0
133dqctm110 comparetotmag   7      70E-1   ->   1
134
135dqctm120 comparetotmag   8.0    7.0     ->   1
136dqctm121 comparetotmag   8.0    7       ->   1
137dqctm122 comparetotmag   8      7.0     ->   1
138dqctm123 comparetotmag   8E+0   7.0     ->   1
139dqctm124 comparetotmag   80E-1  7.0     ->   1
140dqctm125 comparetotmag   0.8E+1 7       ->   1
141dqctm126 comparetotmag   80E-1  7       ->   1
142dqctm127 comparetotmag   8.0    7E+0    ->   1
143dqctm128 comparetotmag   8.0    70E-1   ->   1
144dqctm129 comparetotmag   8      0.7E+1   ->   1
145dqctm130 comparetotmag   8      70E-1   ->   1
146
147dqctm140 comparetotmag   8.0    9.0     ->  -1
148dqctm141 comparetotmag   8.0    9       ->  -1
149dqctm142 comparetotmag   8      9.0     ->  -1
150dqctm143 comparetotmag   8E+0   9.0     ->  -1
151dqctm144 comparetotmag   80E-1  9.0     ->  -1
152dqctm145 comparetotmag   0.8E+1 9       ->  -1
153dqctm146 comparetotmag   80E-1  9       ->  -1
154dqctm147 comparetotmag   8.0    9E+0    ->  -1
155dqctm148 comparetotmag   8.0    90E-1   ->  -1
156dqctm149 comparetotmag   8      0.9E+1  ->  -1
157dqctm150 comparetotmag   8      90E-1   ->  -1
158
159-- and again, with sign changes -+ ..
160dqctm200 comparetotmag  -7.0    7.0     ->   0
161dqctm201 comparetotmag  -7.0    7       ->  -1
162dqctm202 comparetotmag  -7      7.0     ->   1
163dqctm203 comparetotmag  -7E+0   7.0     ->   1
164dqctm204 comparetotmag  -70E-1  7.0     ->   0
165dqctm205 comparetotmag  -0.7E+1 7       ->   0
166dqctm206 comparetotmag  -70E-1  7       ->  -1
167dqctm207 comparetotmag  -7.0    7E+0    ->  -1
168dqctm208 comparetotmag  -7.0    70E-1   ->   0
169dqctm209 comparetotmag  -7      0.7E+1  ->   0
170dqctm210 comparetotmag  -7      70E-1   ->   1
171
172dqctm220 comparetotmag  -8.0    7.0     ->   1
173dqctm221 comparetotmag  -8.0    7       ->   1
174dqctm222 comparetotmag  -8      7.0     ->   1
175dqctm223 comparetotmag  -8E+0   7.0     ->   1
176dqctm224 comparetotmag  -80E-1  7.0     ->   1
177dqctm225 comparetotmag  -0.8E+1 7       ->   1
178dqctm226 comparetotmag  -80E-1  7       ->   1
179dqctm227 comparetotmag  -8.0    7E+0    ->   1
180dqctm228 comparetotmag  -8.0    70E-1   ->   1
181dqctm229 comparetotmag  -8      0.7E+1  ->   1
182dqctm230 comparetotmag  -8      70E-1   ->   1
183
184dqctm240 comparetotmag  -8.0    9.0     ->  -1
185dqctm241 comparetotmag  -8.0    9       ->  -1
186dqctm242 comparetotmag  -8      9.0     ->  -1
187dqctm243 comparetotmag  -8E+0   9.0     ->  -1
188dqctm244 comparetotmag  -80E-1  9.0     ->  -1
189dqctm245 comparetotmag  -0.8E+1 9       ->  -1
190dqctm246 comparetotmag  -80E-1  9       ->  -1
191dqctm247 comparetotmag  -8.0    9E+0    ->  -1
192dqctm248 comparetotmag  -8.0    90E-1   ->  -1
193dqctm249 comparetotmag  -8      0.9E+1  ->  -1
194dqctm250 comparetotmag  -8      90E-1   ->  -1
195
196-- and again, with sign changes +- ..
197dqctm300 comparetotmag   7.0    -7.0     ->   0
198dqctm301 comparetotmag   7.0    -7       ->  -1
199dqctm302 comparetotmag   7      -7.0     ->   1
200dqctm303 comparetotmag   7E+0   -7.0     ->   1
201dqctm304 comparetotmag   70E-1  -7.0     ->   0
202dqctm305 comparetotmag   .7E+1  -7       ->   0
203dqctm306 comparetotmag   70E-1  -7       ->  -1
204dqctm307 comparetotmag   7.0    -7E+0    ->  -1
205dqctm308 comparetotmag   7.0    -70E-1   ->   0
206dqctm309 comparetotmag   7      -.7E+1   ->   0
207dqctm310 comparetotmag   7      -70E-1   ->   1
208
209dqctm320 comparetotmag   8.0    -7.0     ->   1
210dqctm321 comparetotmag   8.0    -7       ->   1
211dqctm322 comparetotmag   8      -7.0     ->   1
212dqctm323 comparetotmag   8E+0   -7.0     ->   1
213dqctm324 comparetotmag   80E-1  -7.0     ->   1
214dqctm325 comparetotmag   .8E+1  -7       ->   1
215dqctm326 comparetotmag   80E-1  -7       ->   1
216dqctm327 comparetotmag   8.0    -7E+0    ->   1
217dqctm328 comparetotmag   8.0    -70E-1   ->   1
218dqctm329 comparetotmag   8      -.7E+1   ->   1
219dqctm330 comparetotmag   8      -70E-1   ->   1
220
221dqctm340 comparetotmag   8.0    -9.0     ->  -1
222dqctm341 comparetotmag   8.0    -9       ->  -1
223dqctm342 comparetotmag   8      -9.0     ->  -1
224dqctm343 comparetotmag   8E+0   -9.0     ->  -1
225dqctm344 comparetotmag   80E-1  -9.0     ->  -1
226dqctm345 comparetotmag   .8E+1  -9       ->  -1
227dqctm346 comparetotmag   80E-1  -9       ->  -1
228dqctm347 comparetotmag   8.0    -9E+0    ->  -1
229dqctm348 comparetotmag   8.0    -90E-1   ->  -1
230dqctm349 comparetotmag   8      -.9E+1   ->  -1
231dqctm350 comparetotmag   8      -90E-1   ->  -1
232
233-- and again, with sign changes -- ..
234dqctm400 comparetotmag   -7.0    -7.0     ->   0
235dqctm401 comparetotmag   -7.0    -7       ->  -1
236dqctm402 comparetotmag   -7      -7.0     ->   1
237dqctm403 comparetotmag   -7E+0   -7.0     ->   1
238dqctm404 comparetotmag   -70E-1  -7.0     ->   0
239dqctm405 comparetotmag   -.7E+1  -7       ->   0
240dqctm406 comparetotmag   -70E-1  -7       ->  -1
241dqctm407 comparetotmag   -7.0    -7E+0    ->  -1
242dqctm408 comparetotmag   -7.0    -70E-1   ->   0
243dqctm409 comparetotmag   -7      -.7E+1   ->   0
244dqctm410 comparetotmag   -7      -70E-1   ->   1
245
246dqctm420 comparetotmag   -8.0    -7.0     ->   1
247dqctm421 comparetotmag   -8.0    -7       ->   1
248dqctm422 comparetotmag   -8      -7.0     ->   1
249dqctm423 comparetotmag   -8E+0   -7.0     ->   1
250dqctm424 comparetotmag   -80E-1  -7.0     ->   1
251dqctm425 comparetotmag   -.8E+1  -7       ->   1
252dqctm426 comparetotmag   -80E-1  -7       ->   1
253dqctm427 comparetotmag   -8.0    -7E+0    ->   1
254dqctm428 comparetotmag   -8.0    -70E-1   ->   1
255dqctm429 comparetotmag   -8      -.7E+1   ->   1
256dqctm430 comparetotmag   -8      -70E-1   ->   1
257
258dqctm440 comparetotmag   -8.0    -9.0     ->  -1
259dqctm441 comparetotmag   -8.0    -9       ->  -1
260dqctm442 comparetotmag   -8      -9.0     ->  -1
261dqctm443 comparetotmag   -8E+0   -9.0     ->  -1
262dqctm444 comparetotmag   -80E-1  -9.0     ->  -1
263dqctm445 comparetotmag   -.8E+1  -9       ->  -1
264dqctm446 comparetotmag   -80E-1  -9       ->  -1
265dqctm447 comparetotmag   -8.0    -9E+0    ->  -1
266dqctm448 comparetotmag   -8.0    -90E-1   ->  -1
267dqctm449 comparetotmag   -8      -.9E+1   ->  -1
268dqctm450 comparetotmag   -8      -90E-1   ->  -1
269
270
271-- testcases that subtract to lots of zeros at boundaries [pgr]
272dqctm473 comparetotmag 123.4560000000000E-89 123.456E-89  ->  -1
273dqctm474 comparetotmag 123.456000000000E+89 123.456E+89  ->  -1
274dqctm475 comparetotmag 123.45600000000E-89 123.456E-89  ->  -1
275dqctm476 comparetotmag 123.4560000000E+89 123.456E+89  ->  -1
276dqctm477 comparetotmag 123.456000000E-89 123.456E-89  ->  -1
277dqctm478 comparetotmag 123.45600000E+89 123.456E+89  ->  -1
278dqctm479 comparetotmag 123.4560000E-89 123.456E-89  ->  -1
279dqctm480 comparetotmag 123.456000E+89 123.456E+89  ->  -1
280dqctm481 comparetotmag 123.45600E-89 123.456E-89  ->  -1
281dqctm482 comparetotmag 123.4560E+89 123.456E+89  ->  -1
282dqctm483 comparetotmag 123.456E-89 123.456E-89  ->   0
283dqctm487 comparetotmag 123.456E+89 123.4560000000000E+89  ->   1
284dqctm488 comparetotmag 123.456E-89 123.456000000000E-89  ->   1
285dqctm489 comparetotmag 123.456E+89 123.45600000000E+89  ->   1
286dqctm490 comparetotmag 123.456E-89 123.4560000000E-89  ->   1
287dqctm491 comparetotmag 123.456E+89 123.456000000E+89  ->   1
288dqctm492 comparetotmag 123.456E-89 123.45600000E-89  ->   1
289dqctm493 comparetotmag 123.456E+89 123.4560000E+89  ->   1
290dqctm494 comparetotmag 123.456E-89 123.456000E-89  ->   1
291dqctm495 comparetotmag 123.456E+89 123.45600E+89  ->   1
292dqctm496 comparetotmag 123.456E-89 123.4560E-89  ->   1
293dqctm497 comparetotmag 123.456E+89 123.456E+89  ->   0
294
295-- wide-ranging, around precision; signs equal
296dqctm498 comparetotmag    1     1E-17     ->   1
297dqctm499 comparetotmag    1     1E-16     ->   1
298dqctm500 comparetotmag    1     1E-15     ->   1
299dqctm501 comparetotmag    1     1E-14     ->   1
300dqctm502 comparetotmag    1     1E-13     ->   1
301dqctm503 comparetotmag    1     1E-12     ->   1
302dqctm504 comparetotmag    1     1E-11     ->   1
303dqctm505 comparetotmag    1     1E-10     ->   1
304dqctm506 comparetotmag    1     1E-9      ->   1
305dqctm507 comparetotmag    1     1E-8      ->   1
306dqctm508 comparetotmag    1     1E-7      ->   1
307dqctm509 comparetotmag    1     1E-6      ->   1
308dqctm510 comparetotmag    1     1E-5      ->   1
309dqctm511 comparetotmag    1     1E-4      ->   1
310dqctm512 comparetotmag    1     1E-3      ->   1
311dqctm513 comparetotmag    1     1E-2      ->   1
312dqctm514 comparetotmag    1     1E-1      ->   1
313dqctm515 comparetotmag    1     1E-0      ->   0
314dqctm516 comparetotmag    1     1E+1      ->  -1
315dqctm517 comparetotmag    1     1E+2      ->  -1
316dqctm518 comparetotmag    1     1E+3      ->  -1
317dqctm519 comparetotmag    1     1E+4      ->  -1
318dqctm521 comparetotmag    1     1E+5      ->  -1
319dqctm522 comparetotmag    1     1E+6      ->  -1
320dqctm523 comparetotmag    1     1E+7      ->  -1
321dqctm524 comparetotmag    1     1E+8      ->  -1
322dqctm525 comparetotmag    1     1E+9      ->  -1
323dqctm526 comparetotmag    1     1E+10     ->  -1
324dqctm527 comparetotmag    1     1E+11     ->  -1
325dqctm528 comparetotmag    1     1E+12     ->  -1
326dqctm529 comparetotmag    1     1E+13     ->  -1
327dqctm530 comparetotmag    1     1E+14     ->  -1
328dqctm531 comparetotmag    1     1E+15     ->  -1
329dqctm532 comparetotmag    1     1E+16     ->  -1
330dqctm533 comparetotmag    1     1E+17     ->  -1
331-- LR swap
332dqctm538 comparetotmag    1E-17  1        ->  -1
333dqctm539 comparetotmag    1E-16  1        ->  -1
334dqctm540 comparetotmag    1E-15  1        ->  -1
335dqctm541 comparetotmag    1E-14  1        ->  -1
336dqctm542 comparetotmag    1E-13  1        ->  -1
337dqctm543 comparetotmag    1E-12  1        ->  -1
338dqctm544 comparetotmag    1E-11  1        ->  -1
339dqctm545 comparetotmag    1E-10  1        ->  -1
340dqctm546 comparetotmag    1E-9   1        ->  -1
341dqctm547 comparetotmag    1E-8   1        ->  -1
342dqctm548 comparetotmag    1E-7   1        ->  -1
343dqctm549 comparetotmag    1E-6   1        ->  -1
344dqctm550 comparetotmag    1E-5   1        ->  -1
345dqctm551 comparetotmag    1E-4   1        ->  -1
346dqctm552 comparetotmag    1E-3   1        ->  -1
347dqctm553 comparetotmag    1E-2   1        ->  -1
348dqctm554 comparetotmag    1E-1   1        ->  -1
349dqctm555 comparetotmag    1E-0   1        ->   0
350dqctm556 comparetotmag    1E+1   1        ->   1
351dqctm557 comparetotmag    1E+2   1        ->   1
352dqctm558 comparetotmag    1E+3   1        ->   1
353dqctm559 comparetotmag    1E+4   1        ->   1
354dqctm561 comparetotmag    1E+5   1        ->   1
355dqctm562 comparetotmag    1E+6   1        ->   1
356dqctm563 comparetotmag    1E+7   1        ->   1
357dqctm564 comparetotmag    1E+8   1        ->   1
358dqctm565 comparetotmag    1E+9   1        ->   1
359dqctm566 comparetotmag    1E+10  1        ->   1
360dqctm567 comparetotmag    1E+11  1        ->   1
361dqctm568 comparetotmag    1E+12  1        ->   1
362dqctm569 comparetotmag    1E+13  1        ->   1
363dqctm570 comparetotmag    1E+14  1        ->   1
364dqctm571 comparetotmag    1E+15  1        ->   1
365dqctm572 comparetotmag    1E+16  1        ->   1
366dqctm573 comparetotmag    1E+17  1        ->   1
367-- similar with a useful coefficient, one side only
368dqctm578 comparetotmag  0.000000987654321     1E-17     ->   1
369dqctm579 comparetotmag  0.000000987654321     1E-16     ->   1
370dqctm580 comparetotmag  0.000000987654321     1E-15     ->   1
371dqctm581 comparetotmag  0.000000987654321     1E-14     ->   1
372dqctm582 comparetotmag  0.000000987654321     1E-13     ->   1
373dqctm583 comparetotmag  0.000000987654321     1E-12     ->   1
374dqctm584 comparetotmag  0.000000987654321     1E-11     ->   1
375dqctm585 comparetotmag  0.000000987654321     1E-10     ->   1
376dqctm586 comparetotmag  0.000000987654321     1E-9      ->   1
377dqctm587 comparetotmag  0.000000987654321     1E-8      ->   1
378dqctm588 comparetotmag  0.000000987654321     1E-7      ->   1
379dqctm589 comparetotmag  0.000000987654321     1E-6      ->  -1
380dqctm590 comparetotmag  0.000000987654321     1E-5      ->  -1
381dqctm591 comparetotmag  0.000000987654321     1E-4      ->  -1
382dqctm592 comparetotmag  0.000000987654321     1E-3      ->  -1
383dqctm593 comparetotmag  0.000000987654321     1E-2      ->  -1
384dqctm594 comparetotmag  0.000000987654321     1E-1      ->  -1
385dqctm595 comparetotmag  0.000000987654321     1E-0      ->  -1
386dqctm596 comparetotmag  0.000000987654321     1E+1      ->  -1
387dqctm597 comparetotmag  0.000000987654321     1E+2      ->  -1
388dqctm598 comparetotmag  0.000000987654321     1E+3      ->  -1
389dqctm599 comparetotmag  0.000000987654321     1E+4      ->  -1
390
391-- check some unit-y traps
392dqctm600 comparetotmag   12            12.2345  ->  -1
393dqctm601 comparetotmag   12.0          12.2345  ->  -1
394dqctm602 comparetotmag   12.00         12.2345  ->  -1
395dqctm603 comparetotmag   12.000        12.2345  ->  -1
396dqctm604 comparetotmag   12.0000       12.2345  ->  -1
397dqctm605 comparetotmag   12.00000      12.2345  ->  -1
398dqctm606 comparetotmag   12.000000     12.2345  ->  -1
399dqctm607 comparetotmag   12.0000000    12.2345  ->  -1
400dqctm608 comparetotmag   12.00000000   12.2345  ->  -1
401dqctm609 comparetotmag   12.000000000  12.2345  ->  -1
402dqctm610 comparetotmag   12.1234 12             ->   1
403dqctm611 comparetotmag   12.1234 12.0           ->   1
404dqctm612 comparetotmag   12.1234 12.00          ->   1
405dqctm613 comparetotmag   12.1234 12.000         ->   1
406dqctm614 comparetotmag   12.1234 12.0000        ->   1
407dqctm615 comparetotmag   12.1234 12.00000       ->   1
408dqctm616 comparetotmag   12.1234 12.000000      ->   1
409dqctm617 comparetotmag   12.1234 12.0000000     ->   1
410dqctm618 comparetotmag   12.1234 12.00000000    ->   1
411dqctm619 comparetotmag   12.1234 12.000000000   ->   1
412dqctm620 comparetotmag  -12           -12.2345  ->  -1
413dqctm621 comparetotmag  -12.0         -12.2345  ->  -1
414dqctm622 comparetotmag  -12.00        -12.2345  ->  -1
415dqctm623 comparetotmag  -12.000       -12.2345  ->  -1
416dqctm624 comparetotmag  -12.0000      -12.2345  ->  -1
417dqctm625 comparetotmag  -12.00000     -12.2345  ->  -1
418dqctm626 comparetotmag  -12.000000    -12.2345  ->  -1
419dqctm627 comparetotmag  -12.0000000   -12.2345  ->  -1
420dqctm628 comparetotmag  -12.00000000  -12.2345  ->  -1
421dqctm629 comparetotmag  -12.000000000 -12.2345  ->  -1
422dqctm630 comparetotmag  -12.1234 -12            ->   1
423dqctm631 comparetotmag  -12.1234 -12.0          ->   1
424dqctm632 comparetotmag  -12.1234 -12.00         ->   1
425dqctm633 comparetotmag  -12.1234 -12.000        ->   1
426dqctm634 comparetotmag  -12.1234 -12.0000       ->   1
427dqctm635 comparetotmag  -12.1234 -12.00000      ->   1
428dqctm636 comparetotmag  -12.1234 -12.000000     ->   1
429dqctm637 comparetotmag  -12.1234 -12.0000000    ->   1
430dqctm638 comparetotmag  -12.1234 -12.00000000   ->   1
431dqctm639 comparetotmag  -12.1234 -12.000000000  ->   1
432
433-- extended zeros
434dqctm640 comparetotmag   0     0    ->   0
435dqctm641 comparetotmag   0    -0    ->   0
436dqctm642 comparetotmag   0    -0.0  ->   1
437dqctm643 comparetotmag   0     0.0  ->   1
438dqctm644 comparetotmag  -0     0    ->   0
439dqctm645 comparetotmag  -0    -0    ->   0
440dqctm646 comparetotmag  -0    -0.0  ->   1
441dqctm647 comparetotmag  -0     0.0  ->   1
442dqctm648 comparetotmag   0.0   0    ->  -1
443dqctm649 comparetotmag   0.0  -0    ->  -1
444dqctm650 comparetotmag   0.0  -0.0  ->   0
445dqctm651 comparetotmag   0.0   0.0  ->   0
446dqctm652 comparetotmag  -0.0   0    ->  -1
447dqctm653 comparetotmag  -0.0  -0    ->  -1
448dqctm654 comparetotmag  -0.0  -0.0  ->   0
449dqctm655 comparetotmag  -0.0   0.0  ->   0
450
451dqctm656 comparetotmag  -0E1   0.0  ->   1
452dqctm657 comparetotmag  -0E2   0.0  ->   1
453dqctm658 comparetotmag   0E1   0.0  ->   1
454dqctm659 comparetotmag   0E2   0.0  ->   1
455dqctm660 comparetotmag  -0E1   0    ->   1
456dqctm661 comparetotmag  -0E2   0    ->   1
457dqctm662 comparetotmag   0E1   0    ->   1
458dqctm663 comparetotmag   0E2   0    ->   1
459dqctm664 comparetotmag  -0E1  -0E1  ->   0
460dqctm665 comparetotmag  -0E2  -0E1  ->   1
461dqctm666 comparetotmag   0E1  -0E1  ->   0
462dqctm667 comparetotmag   0E2  -0E1  ->   1
463dqctm668 comparetotmag  -0E1  -0E2  ->  -1
464dqctm669 comparetotmag  -0E2  -0E2  ->   0
465dqctm670 comparetotmag   0E1  -0E2  ->  -1
466dqctm671 comparetotmag   0E2  -0E2  ->   0
467dqctm672 comparetotmag  -0E1   0E1  ->   0
468dqctm673 comparetotmag  -0E2   0E1  ->   1
469dqctm674 comparetotmag   0E1   0E1  ->   0
470dqctm675 comparetotmag   0E2   0E1  ->   1
471dqctm676 comparetotmag  -0E1   0E2  ->  -1
472dqctm677 comparetotmag  -0E2   0E2  ->   0
473dqctm678 comparetotmag   0E1   0E2  ->  -1
474dqctm679 comparetotmag   0E2   0E2  ->   0
475
476-- trailing zeros; unit-y
477dqctm680 comparetotmag   12    12            ->   0
478dqctm681 comparetotmag   12    12.0          ->   1
479dqctm682 comparetotmag   12    12.00         ->   1
480dqctm683 comparetotmag   12    12.000        ->   1
481dqctm684 comparetotmag   12    12.0000       ->   1
482dqctm685 comparetotmag   12    12.00000      ->   1
483dqctm686 comparetotmag   12    12.000000     ->   1
484dqctm687 comparetotmag   12    12.0000000    ->   1
485dqctm688 comparetotmag   12    12.00000000   ->   1
486dqctm689 comparetotmag   12    12.000000000  ->   1
487dqctm690 comparetotmag   12              12  ->   0
488dqctm691 comparetotmag   12.0            12  ->  -1
489dqctm692 comparetotmag   12.00           12  ->  -1
490dqctm693 comparetotmag   12.000          12  ->  -1
491dqctm694 comparetotmag   12.0000         12  ->  -1
492dqctm695 comparetotmag   12.00000        12  ->  -1
493dqctm696 comparetotmag   12.000000       12  ->  -1
494dqctm697 comparetotmag   12.0000000      12  ->  -1
495dqctm698 comparetotmag   12.00000000     12  ->  -1
496dqctm699 comparetotmag   12.000000000    12  ->  -1
497
498-- old long operand checks
499dqctm701 comparetotmag 12345678000  1  ->   1
500dqctm702 comparetotmag 1 12345678000   ->  -1
501dqctm703 comparetotmag 1234567800   1  ->   1
502dqctm704 comparetotmag 1 1234567800    ->  -1
503dqctm705 comparetotmag 1234567890   1  ->   1
504dqctm706 comparetotmag 1 1234567890    ->  -1
505dqctm707 comparetotmag 1234567891   1  ->   1
506dqctm708 comparetotmag 1 1234567891    ->  -1
507dqctm709 comparetotmag 12345678901  1  ->   1
508dqctm710 comparetotmag 1 12345678901   ->  -1
509dqctm711 comparetotmag 1234567896   1  ->   1
510dqctm712 comparetotmag 1 1234567896    ->  -1
511dqctm713 comparetotmag -1234567891  1  ->   1
512dqctm714 comparetotmag 1 -1234567891   ->  -1
513dqctm715 comparetotmag -12345678901 1  ->   1
514dqctm716 comparetotmag 1 -12345678901  ->  -1
515dqctm717 comparetotmag -1234567896  1  ->   1
516dqctm718 comparetotmag 1 -1234567896   ->  -1
517
518-- old residue cases
519dqctm740 comparetotmag  1  0.9999999   ->   1
520dqctm741 comparetotmag  1  0.999999    ->   1
521dqctm742 comparetotmag  1  0.99999     ->   1
522dqctm743 comparetotmag  1  1.0000      ->   1
523dqctm744 comparetotmag  1  1.00001     ->  -1
524dqctm745 comparetotmag  1  1.000001    ->  -1
525dqctm746 comparetotmag  1  1.0000001   ->  -1
526dqctm750 comparetotmag  0.9999999  1   ->  -1
527dqctm751 comparetotmag  0.999999   1   ->  -1
528dqctm752 comparetotmag  0.99999    1   ->  -1
529dqctm753 comparetotmag  1.0000     1   ->  -1
530dqctm754 comparetotmag  1.00001    1   ->   1
531dqctm755 comparetotmag  1.000001   1   ->   1
532dqctm756 comparetotmag  1.0000001  1   ->   1
533
534-- Specials
535dqctm780 comparetotmag  Inf  -Inf   ->  0
536dqctm781 comparetotmag  Inf  -1000  ->  1
537dqctm782 comparetotmag  Inf  -1     ->  1
538dqctm783 comparetotmag  Inf  -0     ->  1
539dqctm784 comparetotmag  Inf   0     ->  1
540dqctm785 comparetotmag  Inf   1     ->  1
541dqctm786 comparetotmag  Inf   1000  ->  1
542dqctm787 comparetotmag  Inf   Inf   ->  0
543dqctm788 comparetotmag -1000  Inf   -> -1
544dqctm789 comparetotmag -Inf   Inf   ->  0
545dqctm790 comparetotmag -1     Inf   -> -1
546dqctm791 comparetotmag -0     Inf   -> -1
547dqctm792 comparetotmag  0     Inf   -> -1
548dqctm793 comparetotmag  1     Inf   -> -1
549dqctm794 comparetotmag  1000  Inf   -> -1
550dqctm795 comparetotmag  Inf   Inf   ->  0
551
552dqctm800 comparetotmag -Inf  -Inf   ->  0
553dqctm801 comparetotmag -Inf  -1000  ->  1
554dqctm802 comparetotmag -Inf  -1     ->  1
555dqctm803 comparetotmag -Inf  -0     ->  1
556dqctm804 comparetotmag -Inf   0     ->  1
557dqctm805 comparetotmag -Inf   1     ->  1
558dqctm806 comparetotmag -Inf   1000  ->  1
559dqctm807 comparetotmag -Inf   Inf   ->  0
560dqctm808 comparetotmag -Inf  -Inf   ->  0
561dqctm809 comparetotmag -1000 -Inf   -> -1
562dqctm810 comparetotmag -1    -Inf   -> -1
563dqctm811 comparetotmag -0    -Inf   -> -1
564dqctm812 comparetotmag  0    -Inf   -> -1
565dqctm813 comparetotmag  1    -Inf   -> -1
566dqctm814 comparetotmag  1000 -Inf   -> -1
567dqctm815 comparetotmag  Inf  -Inf   ->  0
568
569dqctm821 comparetotmag  NaN -Inf    ->  1
570dqctm822 comparetotmag  NaN -1000   ->  1
571dqctm823 comparetotmag  NaN -1      ->  1
572dqctm824 comparetotmag  NaN -0      ->  1
573dqctm825 comparetotmag  NaN  0      ->  1
574dqctm826 comparetotmag  NaN  1      ->  1
575dqctm827 comparetotmag  NaN  1000   ->  1
576dqctm828 comparetotmag  NaN  Inf    ->  1
577dqctm829 comparetotmag  NaN  NaN    ->  0
578dqctm830 comparetotmag -Inf  NaN    ->  -1
579dqctm831 comparetotmag -1000 NaN    ->  -1
580dqctm832 comparetotmag -1    NaN    ->  -1
581dqctm833 comparetotmag -0    NaN    ->  -1
582dqctm834 comparetotmag  0    NaN    ->  -1
583dqctm835 comparetotmag  1    NaN    ->  -1
584dqctm836 comparetotmag  1000 NaN    ->  -1
585dqctm837 comparetotmag  Inf  NaN    ->  -1
586dqctm838 comparetotmag -NaN -NaN    ->  0
587dqctm839 comparetotmag +NaN -NaN    ->  0
588dqctm840 comparetotmag -NaN +NaN    ->  0
589
590dqctm841 comparetotmag  sNaN -sNaN  ->  0
591dqctm842 comparetotmag  sNaN -NaN   ->  -1
592dqctm843 comparetotmag  sNaN -Inf   ->  1
593dqctm844 comparetotmag  sNaN -1000  ->  1
594dqctm845 comparetotmag  sNaN -1     ->  1
595dqctm846 comparetotmag  sNaN -0     ->  1
596dqctm847 comparetotmag  sNaN  0     ->  1
597dqctm848 comparetotmag  sNaN  1     ->  1
598dqctm849 comparetotmag  sNaN  1000  ->  1
599dqctm850 comparetotmag  sNaN  NaN   ->  -1
600dqctm851 comparetotmag  sNaN sNaN   ->  0
601
602dqctm852 comparetotmag -sNaN sNaN   ->  0
603dqctm853 comparetotmag -NaN  sNaN   ->  1
604dqctm854 comparetotmag -Inf  sNaN   ->  -1
605dqctm855 comparetotmag -1000 sNaN   ->  -1
606dqctm856 comparetotmag -1    sNaN   ->  -1
607dqctm857 comparetotmag -0    sNaN   ->  -1
608dqctm858 comparetotmag  0    sNaN   ->  -1
609dqctm859 comparetotmag  1    sNaN   ->  -1
610dqctm860 comparetotmag  1000 sNaN   ->  -1
611dqctm861 comparetotmag  Inf  sNaN   ->  -1
612dqctm862 comparetotmag  NaN  sNaN   ->  1
613dqctm863 comparetotmag  sNaN sNaN   ->  0
614
615dqctm871 comparetotmag  -sNaN -sNaN  ->  0
616dqctm872 comparetotmag  -sNaN -NaN   ->  -1
617dqctm873 comparetotmag  -sNaN -Inf   ->  1
618dqctm874 comparetotmag  -sNaN -1000  ->  1
619dqctm875 comparetotmag  -sNaN -1     ->  1
620dqctm876 comparetotmag  -sNaN -0     ->  1
621dqctm877 comparetotmag  -sNaN  0     ->  1
622dqctm878 comparetotmag  -sNaN  1     ->  1
623dqctm879 comparetotmag  -sNaN  1000  ->  1
624dqctm880 comparetotmag  -sNaN  NaN   ->  -1
625dqctm881 comparetotmag  -sNaN sNaN   ->  0
626
627dqctm882 comparetotmag -sNaN -sNaN   ->  0
628dqctm883 comparetotmag -NaN  -sNaN   ->  1
629dqctm884 comparetotmag -Inf  -sNaN   ->  -1
630dqctm885 comparetotmag -1000 -sNaN   ->  -1
631dqctm886 comparetotmag -1    -sNaN   ->  -1
632dqctm887 comparetotmag -0    -sNaN   ->  -1
633dqctm888 comparetotmag  0    -sNaN   ->  -1
634dqctm889 comparetotmag  1    -sNaN   ->  -1
635dqctm890 comparetotmag  1000 -sNaN   ->  -1
636dqctm891 comparetotmag  Inf  -sNaN   ->  -1
637dqctm892 comparetotmag  NaN  -sNaN   ->  1
638dqctm893 comparetotmag  sNaN -sNaN   ->  0
639
640-- NaNs with payload
641dqctm960 comparetotmag  NaN9 -Inf   ->  1
642dqctm961 comparetotmag  NaN8  999   ->  1
643dqctm962 comparetotmag  NaN77 Inf   ->  1
644dqctm963 comparetotmag -NaN67 NaN5  ->  1
645dqctm964 comparetotmag -Inf  -NaN4  ->  -1
646dqctm965 comparetotmag -999  -NaN33 ->  -1
647dqctm966 comparetotmag  Inf   NaN2  ->  -1
648
649dqctm970 comparetotmag -NaN41 -NaN42 -> -1
650dqctm971 comparetotmag +NaN41 -NaN42 -> -1
651dqctm972 comparetotmag -NaN41 +NaN42 -> -1
652dqctm973 comparetotmag +NaN41 +NaN42 -> -1
653dqctm974 comparetotmag -NaN42 -NaN01 ->  1
654dqctm975 comparetotmag +NaN42 -NaN01 ->  1
655dqctm976 comparetotmag -NaN42 +NaN01 ->  1
656dqctm977 comparetotmag +NaN42 +NaN01 ->  1
657
658dqctm980 comparetotmag -sNaN771 -sNaN772 -> -1
659dqctm981 comparetotmag +sNaN771 -sNaN772 -> -1
660dqctm982 comparetotmag -sNaN771 +sNaN772 -> -1
661dqctm983 comparetotmag +sNaN771 +sNaN772 -> -1
662dqctm984 comparetotmag -sNaN772 -sNaN771 ->  1
663dqctm985 comparetotmag +sNaN772 -sNaN771 ->  1
664dqctm986 comparetotmag -sNaN772 +sNaN771 ->  1
665dqctm987 comparetotmag +sNaN772 +sNaN771 ->  1
666
667dqctm991 comparetotmag -sNaN99 -Inf    ->  1
668dqctm992 comparetotmag  sNaN98 -11     ->  1
669dqctm993 comparetotmag  sNaN97  NaN    -> -1
670dqctm994 comparetotmag  sNaN16 sNaN94  -> -1
671dqctm995 comparetotmag  NaN85  sNaN83  ->  1
672dqctm996 comparetotmag -Inf    sNaN92  -> -1
673dqctm997 comparetotmag  088    sNaN81  -> -1
674dqctm998 comparetotmag  Inf    sNaN90  -> -1
675dqctm999 comparetotmag  NaN   -sNaN89  ->  1
676
677-- spread zeros
678dqctm1110 comparetotmag   0E-6143  0        ->  -1
679dqctm1111 comparetotmag   0E-6143 -0        ->  -1
680dqctm1112 comparetotmag  -0E-6143  0        ->  -1
681dqctm1113 comparetotmag  -0E-6143 -0        ->  -1
682dqctm1114 comparetotmag   0E-6143  0E+6144   ->  -1
683dqctm1115 comparetotmag   0E-6143 -0E+6144   ->  -1
684dqctm1116 comparetotmag  -0E-6143  0E+6144   ->  -1
685dqctm1117 comparetotmag  -0E-6143 -0E+6144   ->  -1
686dqctm1118 comparetotmag   0       0E+6144   ->  -1
687dqctm1119 comparetotmag   0      -0E+6144   ->  -1
688dqctm1120 comparetotmag  -0       0E+6144   ->  -1
689dqctm1121 comparetotmag  -0      -0E+6144   ->  -1
690
691dqctm1130 comparetotmag   0E+6144  0        ->   1
692dqctm1131 comparetotmag   0E+6144 -0        ->   1
693dqctm1132 comparetotmag  -0E+6144  0        ->   1
694dqctm1133 comparetotmag  -0E+6144 -0        ->   1
695dqctm1134 comparetotmag   0E+6144  0E-6143   ->   1
696dqctm1135 comparetotmag   0E+6144 -0E-6143   ->   1
697dqctm1136 comparetotmag  -0E+6144  0E-6143   ->   1
698dqctm1137 comparetotmag  -0E+6144 -0E-6143   ->   1
699dqctm1138 comparetotmag   0       0E-6143   ->   1
700dqctm1139 comparetotmag   0      -0E-6143   ->   1
701dqctm1140 comparetotmag  -0       0E-6143   ->   1
702dqctm1141 comparetotmag  -0      -0E-6143   ->   1
703
704-- Null tests
705dqctm9990 comparetotmag 10  # -> NaN Invalid_operation
706dqctm9991 comparetotmag  # 10 -> NaN Invalid_operation
707