1------------------------------------------------------------------------
2-- dqCompare.decTest -- decQuad comparison that allows quiet NaNs     --
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
26-- All operands and results are decQuads.
27extended:    1
28clamp:       1
29precision:   34
30maxExponent: 6144
31minExponent: -6143
32rounding:    half_even
33
34-- sanity checks
35dqcom001 compare  -2  -2  -> 0
36dqcom002 compare  -2  -1  -> -1
37dqcom003 compare  -2   0  -> -1
38dqcom004 compare  -2   1  -> -1
39dqcom005 compare  -2   2  -> -1
40dqcom006 compare  -1  -2  -> 1
41dqcom007 compare  -1  -1  -> 0
42dqcom008 compare  -1   0  -> -1
43dqcom009 compare  -1   1  -> -1
44dqcom010 compare  -1   2  -> -1
45dqcom011 compare   0  -2  -> 1
46dqcom012 compare   0  -1  -> 1
47dqcom013 compare   0   0  -> 0
48dqcom014 compare   0   1  -> -1
49dqcom015 compare   0   2  -> -1
50dqcom016 compare   1  -2  -> 1
51dqcom017 compare   1  -1  -> 1
52dqcom018 compare   1   0  -> 1
53dqcom019 compare   1   1  -> 0
54dqcom020 compare   1   2  -> -1
55dqcom021 compare   2  -2  -> 1
56dqcom022 compare   2  -1  -> 1
57dqcom023 compare   2   0  -> 1
58dqcom025 compare   2   1  -> 1
59dqcom026 compare   2   2  -> 0
60
61dqcom031 compare  -20  -20  -> 0
62dqcom032 compare  -20  -10  -> -1
63dqcom033 compare  -20   00  -> -1
64dqcom034 compare  -20   10  -> -1
65dqcom035 compare  -20   20  -> -1
66dqcom036 compare  -10  -20  -> 1
67dqcom037 compare  -10  -10  -> 0
68dqcom038 compare  -10   00  -> -1
69dqcom039 compare  -10   10  -> -1
70dqcom040 compare  -10   20  -> -1
71dqcom041 compare   00  -20  -> 1
72dqcom042 compare   00  -10  -> 1
73dqcom043 compare   00   00  -> 0
74dqcom044 compare   00   10  -> -1
75dqcom045 compare   00   20  -> -1
76dqcom046 compare   10  -20  -> 1
77dqcom047 compare   10  -10  -> 1
78dqcom048 compare   10   00  -> 1
79dqcom049 compare   10   10  -> 0
80dqcom050 compare   10   20  -> -1
81dqcom051 compare   20  -20  -> 1
82dqcom052 compare   20  -10  -> 1
83dqcom053 compare   20   00  -> 1
84dqcom055 compare   20   10  -> 1
85dqcom056 compare   20   20  -> 0
86
87dqcom061 compare  -2.0  -2.0  -> 0
88dqcom062 compare  -2.0  -1.0  -> -1
89dqcom063 compare  -2.0   0.0  -> -1
90dqcom064 compare  -2.0   1.0  -> -1
91dqcom065 compare  -2.0   2.0  -> -1
92dqcom066 compare  -1.0  -2.0  -> 1
93dqcom067 compare  -1.0  -1.0  -> 0
94dqcom068 compare  -1.0   0.0  -> -1
95dqcom069 compare  -1.0   1.0  -> -1
96dqcom070 compare  -1.0   2.0  -> -1
97dqcom071 compare   0.0  -2.0  -> 1
98dqcom072 compare   0.0  -1.0  -> 1
99dqcom073 compare   0.0   0.0  -> 0
100dqcom074 compare   0.0   1.0  -> -1
101dqcom075 compare   0.0   2.0  -> -1
102dqcom076 compare   1.0  -2.0  -> 1
103dqcom077 compare   1.0  -1.0  -> 1
104dqcom078 compare   1.0   0.0  -> 1
105dqcom079 compare   1.0   1.0  -> 0
106dqcom080 compare   1.0   2.0  -> -1
107dqcom081 compare   2.0  -2.0  -> 1
108dqcom082 compare   2.0  -1.0  -> 1
109dqcom083 compare   2.0   0.0  -> 1
110dqcom085 compare   2.0   1.0  -> 1
111dqcom086 compare   2.0   2.0  -> 0
112
113-- now some cases which might overflow if subtract were used
114dqcom090 compare  9.999999999999999999999999999999999E+6144 9.999999999999999999999999999999999E+6144  -> 0
115dqcom091 compare -9.999999999999999999999999999999999E+6144 9.999999999999999999999999999999999E+6144  -> -1
116dqcom092 compare  9.999999999999999999999999999999999E+6144 -9.999999999999999999999999999999999E+6144 -> 1
117dqcom093 compare -9.999999999999999999999999999999999E+6144 -9.999999999999999999999999999999999E+6144 -> 0
118
119-- some differing length/exponent cases
120dqcom100 compare   7.0    7.0    -> 0
121dqcom101 compare   7.0    7      -> 0
122dqcom102 compare   7      7.0    -> 0
123dqcom103 compare   7E+0   7.0    -> 0
124dqcom104 compare   70E-1  7.0    -> 0
125dqcom105 compare   0.7E+1 7      -> 0
126dqcom106 compare   70E-1  7      -> 0
127dqcom107 compare   7.0    7E+0   -> 0
128dqcom108 compare   7.0    70E-1  -> 0
129dqcom109 compare   7      0.7E+1 -> 0
130dqcom110 compare   7      70E-1  -> 0
131
132dqcom120 compare   8.0    7.0    -> 1
133dqcom121 compare   8.0    7      -> 1
134dqcom122 compare   8      7.0    -> 1
135dqcom123 compare   8E+0   7.0    -> 1
136dqcom124 compare   80E-1  7.0    -> 1
137dqcom125 compare   0.8E+1 7      -> 1
138dqcom126 compare   80E-1  7      -> 1
139dqcom127 compare   8.0    7E+0   -> 1
140dqcom128 compare   8.0    70E-1  -> 1
141dqcom129 compare   8      0.7E+1  -> 1
142dqcom130 compare   8      70E-1  -> 1
143
144dqcom140 compare   8.0    9.0    -> -1
145dqcom141 compare   8.0    9      -> -1
146dqcom142 compare   8      9.0    -> -1
147dqcom143 compare   8E+0   9.0    -> -1
148dqcom144 compare   80E-1  9.0    -> -1
149dqcom145 compare   0.8E+1 9      -> -1
150dqcom146 compare   80E-1  9      -> -1
151dqcom147 compare   8.0    9E+0   -> -1
152dqcom148 compare   8.0    90E-1  -> -1
153dqcom149 compare   8      0.9E+1 -> -1
154dqcom150 compare   8      90E-1  -> -1
155
156-- and again, with sign changes -+ ..
157dqcom200 compare  -7.0    7.0    -> -1
158dqcom201 compare  -7.0    7      -> -1
159dqcom202 compare  -7      7.0    -> -1
160dqcom203 compare  -7E+0   7.0    -> -1
161dqcom204 compare  -70E-1  7.0    -> -1
162dqcom205 compare  -0.7E+1 7      -> -1
163dqcom206 compare  -70E-1  7      -> -1
164dqcom207 compare  -7.0    7E+0   -> -1
165dqcom208 compare  -7.0    70E-1  -> -1
166dqcom209 compare  -7      0.7E+1 -> -1
167dqcom210 compare  -7      70E-1  -> -1
168
169dqcom220 compare  -8.0    7.0    -> -1
170dqcom221 compare  -8.0    7      -> -1
171dqcom222 compare  -8      7.0    -> -1
172dqcom223 compare  -8E+0   7.0    -> -1
173dqcom224 compare  -80E-1  7.0    -> -1
174dqcom225 compare  -0.8E+1 7      -> -1
175dqcom226 compare  -80E-1  7      -> -1
176dqcom227 compare  -8.0    7E+0   -> -1
177dqcom228 compare  -8.0    70E-1  -> -1
178dqcom229 compare  -8      0.7E+1 -> -1
179dqcom230 compare  -8      70E-1  -> -1
180
181dqcom240 compare  -8.0    9.0    -> -1
182dqcom241 compare  -8.0    9      -> -1
183dqcom242 compare  -8      9.0    -> -1
184dqcom243 compare  -8E+0   9.0    -> -1
185dqcom244 compare  -80E-1  9.0    -> -1
186dqcom245 compare  -0.8E+1 9      -> -1
187dqcom246 compare  -80E-1  9      -> -1
188dqcom247 compare  -8.0    9E+0   -> -1
189dqcom248 compare  -8.0    90E-1  -> -1
190dqcom249 compare  -8      0.9E+1 -> -1
191dqcom250 compare  -8      90E-1  -> -1
192
193-- and again, with sign changes +- ..
194dqcom300 compare   7.0    -7.0    -> 1
195dqcom301 compare   7.0    -7      -> 1
196dqcom302 compare   7      -7.0    -> 1
197dqcom303 compare   7E+0   -7.0    -> 1
198dqcom304 compare   70E-1  -7.0    -> 1
199dqcom305 compare   .7E+1  -7      -> 1
200dqcom306 compare   70E-1  -7      -> 1
201dqcom307 compare   7.0    -7E+0   -> 1
202dqcom308 compare   7.0    -70E-1  -> 1
203dqcom309 compare   7      -.7E+1  -> 1
204dqcom310 compare   7      -70E-1  -> 1
205
206dqcom320 compare   8.0    -7.0    -> 1
207dqcom321 compare   8.0    -7      -> 1
208dqcom322 compare   8      -7.0    -> 1
209dqcom323 compare   8E+0   -7.0    -> 1
210dqcom324 compare   80E-1  -7.0    -> 1
211dqcom325 compare   .8E+1  -7      -> 1
212dqcom326 compare   80E-1  -7      -> 1
213dqcom327 compare   8.0    -7E+0   -> 1
214dqcom328 compare   8.0    -70E-1  -> 1
215dqcom329 compare   8      -.7E+1  -> 1
216dqcom330 compare   8      -70E-1  -> 1
217
218dqcom340 compare   8.0    -9.0    -> 1
219dqcom341 compare   8.0    -9      -> 1
220dqcom342 compare   8      -9.0    -> 1
221dqcom343 compare   8E+0   -9.0    -> 1
222dqcom344 compare   80E-1  -9.0    -> 1
223dqcom345 compare   .8E+1  -9      -> 1
224dqcom346 compare   80E-1  -9      -> 1
225dqcom347 compare   8.0    -9E+0   -> 1
226dqcom348 compare   8.0    -90E-1  -> 1
227dqcom349 compare   8      -.9E+1  -> 1
228dqcom350 compare   8      -90E-1  -> 1
229
230-- and again, with sign changes -- ..
231dqcom400 compare   -7.0    -7.0    -> 0
232dqcom401 compare   -7.0    -7      -> 0
233dqcom402 compare   -7      -7.0    -> 0
234dqcom403 compare   -7E+0   -7.0    -> 0
235dqcom404 compare   -70E-1  -7.0    -> 0
236dqcom405 compare   -.7E+1  -7      -> 0
237dqcom406 compare   -70E-1  -7      -> 0
238dqcom407 compare   -7.0    -7E+0   -> 0
239dqcom408 compare   -7.0    -70E-1  -> 0
240dqcom409 compare   -7      -.7E+1  -> 0
241dqcom410 compare   -7      -70E-1  -> 0
242
243dqcom420 compare   -8.0    -7.0    -> -1
244dqcom421 compare   -8.0    -7      -> -1
245dqcom422 compare   -8      -7.0    -> -1
246dqcom423 compare   -8E+0   -7.0    -> -1
247dqcom424 compare   -80E-1  -7.0    -> -1
248dqcom425 compare   -.8E+1  -7      -> -1
249dqcom426 compare   -80E-1  -7      -> -1
250dqcom427 compare   -8.0    -7E+0   -> -1
251dqcom428 compare   -8.0    -70E-1  -> -1
252dqcom429 compare   -8      -.7E+1  -> -1
253dqcom430 compare   -8      -70E-1  -> -1
254
255dqcom440 compare   -8.0    -9.0    -> 1
256dqcom441 compare   -8.0    -9      -> 1
257dqcom442 compare   -8      -9.0    -> 1
258dqcom443 compare   -8E+0   -9.0    -> 1
259dqcom444 compare   -80E-1  -9.0    -> 1
260dqcom445 compare   -.8E+1  -9      -> 1
261dqcom446 compare   -80E-1  -9      -> 1
262dqcom447 compare   -8.0    -9E+0   -> 1
263dqcom448 compare   -8.0    -90E-1  -> 1
264dqcom449 compare   -8      -.9E+1  -> 1
265dqcom450 compare   -8      -90E-1  -> 1
266
267-- misalignment traps for little-endian
268dqcom451 compare      1.0       0.1  -> 1
269dqcom452 compare      0.1       1.0  -> -1
270dqcom453 compare     10.0       0.1  -> 1
271dqcom454 compare      0.1      10.0  -> -1
272dqcom455 compare      100       1.0  -> 1
273dqcom456 compare      1.0       100  -> -1
274dqcom457 compare     1000      10.0  -> 1
275dqcom458 compare     10.0      1000  -> -1
276dqcom459 compare    10000     100.0  -> 1
277dqcom460 compare    100.0     10000  -> -1
278dqcom461 compare   100000    1000.0  -> 1
279dqcom462 compare   1000.0    100000  -> -1
280dqcom463 compare  1000000   10000.0  -> 1
281dqcom464 compare  10000.0   1000000  -> -1
282
283-- testcases that subtract to lots of zeros at boundaries [pgr]
284dqcom473 compare 123.9999999999999999994560000000000E-89 123.999999999999999999456E-89 -> 0
285dqcom474 compare 123.999999999999999999456000000000E+89 123.999999999999999999456E+89 -> 0
286dqcom475 compare 123.99999999999999999945600000000E-89 123.999999999999999999456E-89 -> 0
287dqcom476 compare 123.9999999999999999994560000000E+89 123.999999999999999999456E+89 -> 0
288dqcom477 compare 123.999999999999999999456000000E-89 123.999999999999999999456E-89 -> 0
289dqcom478 compare 123.99999999999999999945600000E+89 123.999999999999999999456E+89 -> 0
290dqcom479 compare 123.9999999999999999994560000E-89 123.999999999999999999456E-89 -> 0
291dqcom480 compare 123.999999999999999999456000E+89 123.999999999999999999456E+89 -> 0
292dqcom481 compare 123.99999999999999999945600E-89 123.999999999999999999456E-89 -> 0
293dqcom482 compare 123.9999999999999999994560E+89 123.999999999999999999456E+89 -> 0
294dqcom483 compare 123.999999999999999999456E-89 123.999999999999999999456E-89 -> 0
295dqcom487 compare 123.999999999999999999456E+89 123.9999999999999999994560000000000E+89 -> 0
296dqcom488 compare 123.999999999999999999456E-89 123.999999999999999999456000000000E-89 -> 0
297dqcom489 compare 123.999999999999999999456E+89 123.99999999999999999945600000000E+89 -> 0
298dqcom490 compare 123.999999999999999999456E-89 123.9999999999999999994560000000E-89 -> 0
299dqcom491 compare 123.999999999999999999456E+89 123.999999999999999999456000000E+89 -> 0
300dqcom492 compare 123.999999999999999999456E-89 123.99999999999999999945600000E-89 -> 0
301dqcom493 compare 123.999999999999999999456E+89 123.9999999999999999994560000E+89 -> 0
302dqcom494 compare 123.999999999999999999456E-89 123.999999999999999999456000E-89 -> 0
303dqcom495 compare 123.999999999999999999456E+89 123.99999999999999999945600E+89 -> 0
304dqcom496 compare 123.999999999999999999456E-89 123.9999999999999999994560E-89 -> 0
305dqcom497 compare 123.999999999999999999456E+89 123.999999999999999999456E+89 -> 0
306
307-- wide-ranging, around precision; signs equal
308dqcom500 compare    1     1E-15    -> 1
309dqcom501 compare    1     1E-14    -> 1
310dqcom502 compare    1     1E-13    -> 1
311dqcom503 compare    1     1E-12    -> 1
312dqcom504 compare    1     1E-11    -> 1
313dqcom505 compare    1     1E-10    -> 1
314dqcom506 compare    1     1E-9     -> 1
315dqcom507 compare    1     1E-8     -> 1
316dqcom508 compare    1     1E-7     -> 1
317dqcom509 compare    1     1E-6     -> 1
318dqcom510 compare    1     1E-5     -> 1
319dqcom511 compare    1     1E-4     -> 1
320dqcom512 compare    1     1E-3     -> 1
321dqcom513 compare    1     1E-2     -> 1
322dqcom514 compare    1     1E-1     -> 1
323dqcom515 compare    1     1E-0     -> 0
324dqcom516 compare    1     1E+1     -> -1
325dqcom517 compare    1     1E+2     -> -1
326dqcom518 compare    1     1E+3     -> -1
327dqcom519 compare    1     1E+4     -> -1
328dqcom521 compare    1     1E+5     -> -1
329dqcom522 compare    1     1E+6     -> -1
330dqcom523 compare    1     1E+7     -> -1
331dqcom524 compare    1     1E+8     -> -1
332dqcom525 compare    1     1E+9     -> -1
333dqcom526 compare    1     1E+10    -> -1
334dqcom527 compare    1     1E+11    -> -1
335dqcom528 compare    1     1E+12    -> -1
336dqcom529 compare    1     1E+13    -> -1
337dqcom530 compare    1     1E+14    -> -1
338dqcom531 compare    1     1E+15    -> -1
339-- LR swap
340dqcom540 compare    1E-15  1       -> -1
341dqcom541 compare    1E-14  1       -> -1
342dqcom542 compare    1E-13  1       -> -1
343dqcom543 compare    1E-12  1       -> -1
344dqcom544 compare    1E-11  1       -> -1
345dqcom545 compare    1E-10  1       -> -1
346dqcom546 compare    1E-9   1       -> -1
347dqcom547 compare    1E-8   1       -> -1
348dqcom548 compare    1E-7   1       -> -1
349dqcom549 compare    1E-6   1       -> -1
350dqcom550 compare    1E-5   1       -> -1
351dqcom551 compare    1E-4   1       -> -1
352dqcom552 compare    1E-3   1       -> -1
353dqcom553 compare    1E-2   1       -> -1
354dqcom554 compare    1E-1   1       -> -1
355dqcom555 compare    1E-0   1       ->  0
356dqcom556 compare    1E+1   1       ->  1
357dqcom557 compare    1E+2   1       ->  1
358dqcom558 compare    1E+3   1       ->  1
359dqcom559 compare    1E+4   1       ->  1
360dqcom561 compare    1E+5   1       ->  1
361dqcom562 compare    1E+6   1       ->  1
362dqcom563 compare    1E+7   1       ->  1
363dqcom564 compare    1E+8   1       ->  1
364dqcom565 compare    1E+9   1       ->  1
365dqcom566 compare    1E+10  1       ->  1
366dqcom567 compare    1E+11  1       ->  1
367dqcom568 compare    1E+12  1       ->  1
368dqcom569 compare    1E+13  1       ->  1
369dqcom570 compare    1E+14  1       ->  1
370dqcom571 compare    1E+15  1       ->  1
371-- similar with a useful coefficient, one side only
372dqcom580 compare  0.000000987654321     1E-15    -> 1
373dqcom581 compare  0.000000987654321     1E-14    -> 1
374dqcom582 compare  0.000000987654321     1E-13    -> 1
375dqcom583 compare  0.000000987654321     1E-12    -> 1
376dqcom584 compare  0.000000987654321     1E-11    -> 1
377dqcom585 compare  0.000000987654321     1E-10    -> 1
378dqcom586 compare  0.000000987654321     1E-9     -> 1
379dqcom587 compare  0.000000987654321     1E-8     -> 1
380dqcom588 compare  0.000000987654321     1E-7     -> 1
381dqcom589 compare  0.000000987654321     1E-6     -> -1
382dqcom590 compare  0.000000987654321     1E-5     -> -1
383dqcom591 compare  0.000000987654321     1E-4     -> -1
384dqcom592 compare  0.000000987654321     1E-3     -> -1
385dqcom593 compare  0.000000987654321     1E-2     -> -1
386dqcom594 compare  0.000000987654321     1E-1     -> -1
387dqcom595 compare  0.000000987654321     1E-0     -> -1
388dqcom596 compare  0.000000987654321     1E+1     -> -1
389dqcom597 compare  0.000000987654321     1E+2     -> -1
390dqcom598 compare  0.000000987654321     1E+3     -> -1
391dqcom599 compare  0.000000987654321     1E+4     -> -1
392
393-- check some unit-y traps
394dqcom600 compare   12            12.2345 -> -1
395dqcom601 compare   12.0          12.2345 -> -1
396dqcom602 compare   12.00         12.2345 -> -1
397dqcom603 compare   12.000        12.2345 -> -1
398dqcom604 compare   12.0000       12.2345 -> -1
399dqcom605 compare   12.00000      12.2345 -> -1
400dqcom606 compare   12.000000     12.2345 -> -1
401dqcom607 compare   12.0000000    12.2345 -> -1
402dqcom608 compare   12.00000000   12.2345 -> -1
403dqcom609 compare   12.000000000  12.2345 -> -1
404dqcom610 compare   12.1234 12            ->  1
405dqcom611 compare   12.1234 12.0          ->  1
406dqcom612 compare   12.1234 12.00         ->  1
407dqcom613 compare   12.1234 12.000        ->  1
408dqcom614 compare   12.1234 12.0000       ->  1
409dqcom615 compare   12.1234 12.00000      ->  1
410dqcom616 compare   12.1234 12.000000     ->  1
411dqcom617 compare   12.1234 12.0000000    ->  1
412dqcom618 compare   12.1234 12.00000000   ->  1
413dqcom619 compare   12.1234 12.000000000  ->  1
414dqcom620 compare  -12           -12.2345 ->  1
415dqcom621 compare  -12.0         -12.2345 ->  1
416dqcom622 compare  -12.00        -12.2345 ->  1
417dqcom623 compare  -12.000       -12.2345 ->  1
418dqcom624 compare  -12.0000      -12.2345 ->  1
419dqcom625 compare  -12.00000     -12.2345 ->  1
420dqcom626 compare  -12.000000    -12.2345 ->  1
421dqcom627 compare  -12.0000000   -12.2345 ->  1
422dqcom628 compare  -12.00000000  -12.2345 ->  1
423dqcom629 compare  -12.000000000 -12.2345 ->  1
424dqcom630 compare  -12.1234 -12           -> -1
425dqcom631 compare  -12.1234 -12.0         -> -1
426dqcom632 compare  -12.1234 -12.00        -> -1
427dqcom633 compare  -12.1234 -12.000       -> -1
428dqcom634 compare  -12.1234 -12.0000      -> -1
429dqcom635 compare  -12.1234 -12.00000     -> -1
430dqcom636 compare  -12.1234 -12.000000    -> -1
431dqcom637 compare  -12.1234 -12.0000000   -> -1
432dqcom638 compare  -12.1234 -12.00000000  -> -1
433dqcom639 compare  -12.1234 -12.000000000 -> -1
434
435-- extended zeros
436dqcom640 compare   0     0   -> 0
437dqcom641 compare   0    -0   -> 0
438dqcom642 compare   0    -0.0 -> 0
439dqcom643 compare   0     0.0 -> 0
440dqcom644 compare  -0     0   -> 0
441dqcom645 compare  -0    -0   -> 0
442dqcom646 compare  -0    -0.0 -> 0
443dqcom647 compare  -0     0.0 -> 0
444dqcom648 compare   0.0   0   -> 0
445dqcom649 compare   0.0  -0   -> 0
446dqcom650 compare   0.0  -0.0 -> 0
447dqcom651 compare   0.0   0.0 -> 0
448dqcom652 compare  -0.0   0   -> 0
449dqcom653 compare  -0.0  -0   -> 0
450dqcom654 compare  -0.0  -0.0 -> 0
451dqcom655 compare  -0.0   0.0 -> 0
452
453dqcom656 compare  -0E1   0.0 -> 0
454dqcom657 compare  -0E2   0.0 -> 0
455dqcom658 compare   0E1   0.0 -> 0
456dqcom659 compare   0E2   0.0 -> 0
457dqcom660 compare  -0E1   0   -> 0
458dqcom661 compare  -0E2   0   -> 0
459dqcom662 compare   0E1   0   -> 0
460dqcom663 compare   0E2   0   -> 0
461dqcom664 compare  -0E1  -0E1 -> 0
462dqcom665 compare  -0E2  -0E1 -> 0
463dqcom666 compare   0E1  -0E1 -> 0
464dqcom667 compare   0E2  -0E1 -> 0
465dqcom668 compare  -0E1  -0E2 -> 0
466dqcom669 compare  -0E2  -0E2 -> 0
467dqcom670 compare   0E1  -0E2 -> 0
468dqcom671 compare   0E2  -0E2 -> 0
469dqcom672 compare  -0E1   0E1 -> 0
470dqcom673 compare  -0E2   0E1 -> 0
471dqcom674 compare   0E1   0E1 -> 0
472dqcom675 compare   0E2   0E1 -> 0
473dqcom676 compare  -0E1   0E2 -> 0
474dqcom677 compare  -0E2   0E2 -> 0
475dqcom678 compare   0E1   0E2 -> 0
476dqcom679 compare   0E2   0E2 -> 0
477
478-- trailing zeros; unit-y
479dqcom680 compare   12    12           -> 0
480dqcom681 compare   12    12.0         -> 0
481dqcom682 compare   12    12.00        -> 0
482dqcom683 compare   12    12.000       -> 0
483dqcom684 compare   12    12.0000      -> 0
484dqcom685 compare   12    12.00000     -> 0
485dqcom686 compare   12    12.000000    -> 0
486dqcom687 compare   12    12.0000000   -> 0
487dqcom688 compare   12    12.00000000  -> 0
488dqcom689 compare   12    12.000000000 -> 0
489dqcom690 compare   12              12 -> 0
490dqcom691 compare   12.0            12 -> 0
491dqcom692 compare   12.00           12 -> 0
492dqcom693 compare   12.000          12 -> 0
493dqcom694 compare   12.0000         12 -> 0
494dqcom695 compare   12.00000        12 -> 0
495dqcom696 compare   12.000000       12 -> 0
496dqcom697 compare   12.0000000      12 -> 0
497dqcom698 compare   12.00000000     12 -> 0
498dqcom699 compare   12.000000000    12 -> 0
499
500-- first, second, & last digit
501dqcom700 compare   1234567899999999999999999990123456 1234567899999999999999999990123455 -> 1
502dqcom701 compare   1234567899999999999999999990123456 1234567899999999999999999990123456 -> 0
503dqcom702 compare   1234567899999999999999999990123456 1234567899999999999999999990123457 -> -1
504dqcom703 compare   1234567899999999999999999990123456 0234567899999999999999999990123456 -> 1
505dqcom704 compare   1234567899999999999999999990123456 1234567899999999999999999990123456 -> 0
506dqcom705 compare   1234567899999999999999999990123456 2234567899999999999999999990123456 -> -1
507dqcom706 compare   1134567899999999999999999990123456 1034567899999999999999999990123456 -> 1
508dqcom707 compare   1134567899999999999999999990123456 1134567899999999999999999990123456 -> 0
509dqcom708 compare   1134567899999999999999999990123456 1234567899999999999999999990123456 -> -1
510
511-- miscellaneous
512dqcom721 compare 12345678000 1 -> 1
513dqcom722 compare 1 12345678000 -> -1
514dqcom723 compare 1234567800  1 -> 1
515dqcom724 compare 1 1234567800  -> -1
516dqcom725 compare 1234567890  1 -> 1
517dqcom726 compare 1 1234567890  -> -1
518dqcom727 compare 1234567891  1 -> 1
519dqcom728 compare 1 1234567891  -> -1
520dqcom729 compare 12345678901 1 -> 1
521dqcom730 compare 1 12345678901 -> -1
522dqcom731 compare 1234567896  1 -> 1
523dqcom732 compare 1 1234567896  -> -1
524
525-- residue cases at lower precision
526dqcom740 compare  1  0.9999999  -> 1
527dqcom741 compare  1  0.999999   -> 1
528dqcom742 compare  1  0.99999    -> 1
529dqcom743 compare  1  1.0000     -> 0
530dqcom744 compare  1  1.00001    -> -1
531dqcom745 compare  1  1.000001   -> -1
532dqcom746 compare  1  1.0000001  -> -1
533dqcom750 compare  0.9999999  1  -> -1
534dqcom751 compare  0.999999   1  -> -1
535dqcom752 compare  0.99999    1  -> -1
536dqcom753 compare  1.0000     1  -> 0
537dqcom754 compare  1.00001    1  -> 1
538dqcom755 compare  1.000001   1  -> 1
539dqcom756 compare  1.0000001  1  -> 1
540
541-- Specials
542dqcom780 compare  Inf  -Inf   ->  1
543dqcom781 compare  Inf  -1000  ->  1
544dqcom782 compare  Inf  -1     ->  1
545dqcom783 compare  Inf  -0     ->  1
546dqcom784 compare  Inf   0     ->  1
547dqcom785 compare  Inf   1     ->  1
548dqcom786 compare  Inf   1000  ->  1
549dqcom787 compare  Inf   Inf   ->  0
550dqcom788 compare -1000  Inf   -> -1
551dqcom789 compare -Inf   Inf   -> -1
552dqcom790 compare -1     Inf   -> -1
553dqcom791 compare -0     Inf   -> -1
554dqcom792 compare  0     Inf   -> -1
555dqcom793 compare  1     Inf   -> -1
556dqcom794 compare  1000  Inf   -> -1
557dqcom795 compare  Inf   Inf   ->  0
558
559dqcom800 compare -Inf  -Inf   ->  0
560dqcom801 compare -Inf  -1000  -> -1
561dqcom802 compare -Inf  -1     -> -1
562dqcom803 compare -Inf  -0     -> -1
563dqcom804 compare -Inf   0     -> -1
564dqcom805 compare -Inf   1     -> -1
565dqcom806 compare -Inf   1000  -> -1
566dqcom807 compare -Inf   Inf   -> -1
567dqcom808 compare -Inf  -Inf   ->  0
568dqcom809 compare -1000 -Inf   ->  1
569dqcom810 compare -1    -Inf   ->  1
570dqcom811 compare -0    -Inf   ->  1
571dqcom812 compare  0    -Inf   ->  1
572dqcom813 compare  1    -Inf   ->  1
573dqcom814 compare  1000 -Inf   ->  1
574dqcom815 compare  Inf  -Inf   ->  1
575
576dqcom821 compare  NaN -Inf    ->  NaN
577dqcom822 compare  NaN -1000   ->  NaN
578dqcom823 compare  NaN -1      ->  NaN
579dqcom824 compare  NaN -0      ->  NaN
580dqcom825 compare  NaN  0      ->  NaN
581dqcom826 compare  NaN  1      ->  NaN
582dqcom827 compare  NaN  1000   ->  NaN
583dqcom828 compare  NaN  Inf    ->  NaN
584dqcom829 compare  NaN  NaN    ->  NaN
585dqcom830 compare -Inf  NaN    ->  NaN
586dqcom831 compare -1000 NaN    ->  NaN
587dqcom832 compare -1    NaN    ->  NaN
588dqcom833 compare -0    NaN    ->  NaN
589dqcom834 compare  0    NaN    ->  NaN
590dqcom835 compare  1    NaN    ->  NaN
591dqcom836 compare  1000 NaN    ->  NaN
592dqcom837 compare  Inf  NaN    ->  NaN
593dqcom838 compare -NaN -NaN    -> -NaN
594dqcom839 compare +NaN -NaN    ->  NaN
595dqcom840 compare -NaN +NaN    -> -NaN
596
597dqcom841 compare  sNaN -Inf   ->  NaN  Invalid_operation
598dqcom842 compare  sNaN -1000  ->  NaN  Invalid_operation
599dqcom843 compare  sNaN -1     ->  NaN  Invalid_operation
600dqcom844 compare  sNaN -0     ->  NaN  Invalid_operation
601dqcom845 compare  sNaN  0     ->  NaN  Invalid_operation
602dqcom846 compare  sNaN  1     ->  NaN  Invalid_operation
603dqcom847 compare  sNaN  1000  ->  NaN  Invalid_operation
604dqcom848 compare  sNaN  NaN   ->  NaN  Invalid_operation
605dqcom849 compare  sNaN sNaN   ->  NaN  Invalid_operation
606dqcom850 compare  NaN  sNaN   ->  NaN  Invalid_operation
607dqcom851 compare -Inf  sNaN   ->  NaN  Invalid_operation
608dqcom852 compare -1000 sNaN   ->  NaN  Invalid_operation
609dqcom853 compare -1    sNaN   ->  NaN  Invalid_operation
610dqcom854 compare -0    sNaN   ->  NaN  Invalid_operation
611dqcom855 compare  0    sNaN   ->  NaN  Invalid_operation
612dqcom856 compare  1    sNaN   ->  NaN  Invalid_operation
613dqcom857 compare  1000 sNaN   ->  NaN  Invalid_operation
614dqcom858 compare  Inf  sNaN   ->  NaN  Invalid_operation
615dqcom859 compare  NaN  sNaN   ->  NaN  Invalid_operation
616
617-- propagating NaNs
618dqcom860 compare  NaN9 -Inf   ->  NaN9
619dqcom861 compare  NaN8  999   ->  NaN8
620dqcom862 compare  NaN77 Inf   ->  NaN77
621dqcom863 compare -NaN67 NaN5  -> -NaN67
622dqcom864 compare -Inf  -NaN4  -> -NaN4
623dqcom865 compare -999  -NaN33 -> -NaN33
624dqcom866 compare  Inf   NaN2  ->  NaN2
625dqcom867 compare -NaN41 -NaN42 -> -NaN41
626dqcom868 compare +NaN41 -NaN42 ->  NaN41
627dqcom869 compare -NaN41 +NaN42 -> -NaN41
628dqcom870 compare +NaN41 +NaN42 ->  NaN41
629
630dqcom871 compare -sNaN99 -Inf    -> -NaN99 Invalid_operation
631dqcom872 compare  sNaN98 -11     ->  NaN98 Invalid_operation
632dqcom873 compare  sNaN97  NaN    ->  NaN97 Invalid_operation
633dqcom874 compare  sNaN16 sNaN94  ->  NaN16 Invalid_operation
634dqcom875 compare  NaN85  sNaN83  ->  NaN83 Invalid_operation
635dqcom876 compare -Inf    sNaN92  ->  NaN92 Invalid_operation
636dqcom877 compare  088    sNaN81  ->  NaN81 Invalid_operation
637dqcom878 compare  Inf    sNaN90  ->  NaN90 Invalid_operation
638dqcom879 compare  NaN   -sNaN89  -> -NaN89 Invalid_operation
639
640-- wide range
641dqcom880 compare +1.23456789012345E-0 9E+6144 -> -1
642dqcom881 compare 9E+6144 +1.23456789012345E-0 ->  1
643dqcom882 compare +0.100 9E-6143               ->  1
644dqcom883 compare 9E-6143 +0.100               -> -1
645dqcom885 compare -1.23456789012345E-0 9E+6144 -> -1
646dqcom886 compare 9E+6144 -1.23456789012345E-0 ->  1
647dqcom887 compare -0.100 9E-6143               -> -1
648dqcom888 compare 9E-6143 -0.100               ->  1
649
650-- signs
651dqcom901 compare  1e+77  1e+11 ->  1
652dqcom902 compare  1e+77 -1e+11 ->  1
653dqcom903 compare -1e+77  1e+11 -> -1
654dqcom904 compare -1e+77 -1e+11 -> -1
655dqcom905 compare  1e-77  1e-11 -> -1
656dqcom906 compare  1e-77 -1e-11 ->  1
657dqcom907 compare -1e-77  1e-11 -> -1
658dqcom908 compare -1e-77 -1e-11 ->  1
659
660-- full alignment range, both ways
661dqcomp1001 compare 1 1.000000000000000000000000000000000  -> 0
662dqcomp1002 compare 1 1.00000000000000000000000000000000   -> 0
663dqcomp1003 compare 1 1.0000000000000000000000000000000    -> 0
664dqcomp1004 compare 1 1.000000000000000000000000000000     -> 0
665dqcomp1005 compare 1 1.00000000000000000000000000000      -> 0
666dqcomp1006 compare 1 1.0000000000000000000000000000       -> 0
667dqcomp1007 compare 1 1.000000000000000000000000000        -> 0
668dqcomp1008 compare 1 1.00000000000000000000000000         -> 0
669dqcomp1009 compare 1 1.0000000000000000000000000          -> 0
670dqcomp1010 compare 1 1.000000000000000000000000           -> 0
671dqcomp1011 compare 1 1.00000000000000000000000            -> 0
672dqcomp1012 compare 1 1.0000000000000000000000             -> 0
673dqcomp1013 compare 1 1.000000000000000000000              -> 0
674dqcomp1014 compare 1 1.00000000000000000000               -> 0
675dqcomp1015 compare 1 1.0000000000000000000                -> 0
676dqcomp1016 compare 1 1.000000000000000000                 -> 0
677dqcomp1017 compare 1 1.00000000000000000                  -> 0
678dqcomp1018 compare 1 1.0000000000000000                   -> 0
679dqcomp1019 compare 1 1.000000000000000  -> 0
680dqcomp1020 compare 1 1.00000000000000   -> 0
681dqcomp1021 compare 1 1.0000000000000    -> 0
682dqcomp1022 compare 1 1.000000000000     -> 0
683dqcomp1023 compare 1 1.00000000000      -> 0
684dqcomp1024 compare 1 1.0000000000       -> 0
685dqcomp1025 compare 1 1.000000000        -> 0
686dqcomp1026 compare 1 1.00000000         -> 0
687dqcomp1027 compare 1 1.0000000          -> 0
688dqcomp1028 compare 1 1.000000           -> 0
689dqcomp1029 compare 1 1.00000            -> 0
690dqcomp1030 compare 1 1.0000             -> 0
691dqcomp1031 compare 1 1.000              -> 0
692dqcomp1032 compare 1 1.00               -> 0
693dqcomp1033 compare 1 1.0                -> 0
694
695dqcomp1041 compare 1.000000000000000000000000000000000  1 -> 0
696dqcomp1042 compare 1.00000000000000000000000000000000   1 -> 0
697dqcomp1043 compare 1.0000000000000000000000000000000    1 -> 0
698dqcomp1044 compare 1.000000000000000000000000000000     1 -> 0
699dqcomp1045 compare 1.00000000000000000000000000000      1 -> 0
700dqcomp1046 compare 1.0000000000000000000000000000       1 -> 0
701dqcomp1047 compare 1.000000000000000000000000000        1 -> 0
702dqcomp1048 compare 1.00000000000000000000000000         1 -> 0
703dqcomp1049 compare 1.0000000000000000000000000          1 -> 0
704dqcomp1050 compare 1.000000000000000000000000           1 -> 0
705dqcomp1051 compare 1.00000000000000000000000            1 -> 0
706dqcomp1052 compare 1.0000000000000000000000             1 -> 0
707dqcomp1053 compare 1.000000000000000000000              1 -> 0
708dqcomp1054 compare 1.00000000000000000000               1 -> 0
709dqcomp1055 compare 1.0000000000000000000                1 -> 0
710dqcomp1056 compare 1.000000000000000000                 1 -> 0
711dqcomp1057 compare 1.00000000000000000                  1 -> 0
712dqcomp1058 compare 1.0000000000000000                   1 -> 0
713dqcomp1059 compare 1.000000000000000  1 -> 0
714dqcomp1060 compare 1.00000000000000   1 -> 0
715dqcomp1061 compare 1.0000000000000    1 -> 0
716dqcomp1062 compare 1.000000000000     1 -> 0
717dqcomp1063 compare 1.00000000000      1 -> 0
718dqcomp1064 compare 1.0000000000       1 -> 0
719dqcomp1065 compare 1.000000000        1 -> 0
720dqcomp1066 compare 1.00000000         1 -> 0
721dqcomp1067 compare 1.0000000          1 -> 0
722dqcomp1068 compare 1.000000           1 -> 0
723dqcomp1069 compare 1.00000            1 -> 0
724dqcomp1070 compare 1.0000             1 -> 0
725dqcomp1071 compare 1.000              1 -> 0
726dqcomp1072 compare 1.00               1 -> 0
727dqcomp1073 compare 1.0                1 -> 0
728
729-- check MSD always detected non-zero
730dqcomp1080 compare 0 0.000000000000000000000000000000000  -> 0
731dqcomp1081 compare 0 1.000000000000000000000000000000000  -> -1
732dqcomp1082 compare 0 2.000000000000000000000000000000000  -> -1
733dqcomp1083 compare 0 3.000000000000000000000000000000000  -> -1
734dqcomp1084 compare 0 4.000000000000000000000000000000000  -> -1
735dqcomp1085 compare 0 5.000000000000000000000000000000000  -> -1
736dqcomp1086 compare 0 6.000000000000000000000000000000000  -> -1
737dqcomp1087 compare 0 7.000000000000000000000000000000000  -> -1
738dqcomp1088 compare 0 8.000000000000000000000000000000000  -> -1
739dqcomp1089 compare 0 9.000000000000000000000000000000000  -> -1
740dqcomp1090 compare 0.000000000000000000000000000000000  0 -> 0
741dqcomp1091 compare 1.000000000000000000000000000000000  0 -> 1
742dqcomp1092 compare 2.000000000000000000000000000000000  0 -> 1
743dqcomp1093 compare 3.000000000000000000000000000000000  0 -> 1
744dqcomp1094 compare 4.000000000000000000000000000000000  0 -> 1
745dqcomp1095 compare 5.000000000000000000000000000000000  0 -> 1
746dqcomp1096 compare 6.000000000000000000000000000000000  0 -> 1
747dqcomp1097 compare 7.000000000000000000000000000000000  0 -> 1
748dqcomp1098 compare 8.000000000000000000000000000000000  0 -> 1
749dqcomp1099 compare 9.000000000000000000000000000000000  0 -> 1
750
751-- Null tests
752dqcom990 compare 10  # -> NaN Invalid_operation
753dqcom991 compare  # 10 -> NaN Invalid_operation
754