PageRenderTime 478ms CodeModel.GetById 142ms app.highlight 108ms RepoModel.GetById 154ms app.codeStats 1ms

/Lib/test/decimaltestdata/ddCompareTotal.decTest

http://unladen-swallow.googlecode.com/
Unknown | 706 lines | 665 code | 41 blank | 0 comment | 0 complexity | 218992a9dc611b353c062f64bba8e086 MD5 | raw file
  1------------------------------------------------------------------------
  2-- ddCompareTotal.decTest -- decDouble 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.58
 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 decDoubles.
 29precision:   16
 30maxExponent: 384
 31minExponent: -383
 32extended:    1
 33clamp:       1
 34rounding:    half_even
 35
 36-- sanity checks
 37ddcot001 comparetotal  -2  -2  -> 0
 38ddcot002 comparetotal  -2  -1  -> -1
 39ddcot003 comparetotal  -2   0  -> -1
 40ddcot004 comparetotal  -2   1  -> -1
 41ddcot005 comparetotal  -2   2  -> -1
 42ddcot006 comparetotal  -1  -2  -> 1
 43ddcot007 comparetotal  -1  -1  -> 0
 44ddcot008 comparetotal  -1   0  -> -1
 45ddcot009 comparetotal  -1   1  -> -1
 46ddcot010 comparetotal  -1   2  -> -1
 47ddcot011 comparetotal   0  -2  -> 1
 48ddcot012 comparetotal   0  -1  -> 1
 49ddcot013 comparetotal   0   0  -> 0
 50ddcot014 comparetotal   0   1  -> -1
 51ddcot015 comparetotal   0   2  -> -1
 52ddcot016 comparetotal   1  -2  -> 1
 53ddcot017 comparetotal   1  -1  -> 1
 54ddcot018 comparetotal   1   0  -> 1
 55ddcot019 comparetotal   1   1  -> 0
 56ddcot020 comparetotal   1   2  -> -1
 57ddcot021 comparetotal   2  -2  -> 1
 58ddcot022 comparetotal   2  -1  -> 1
 59ddcot023 comparetotal   2   0  -> 1
 60ddcot025 comparetotal   2   1  -> 1
 61ddcot026 comparetotal   2   2  -> 0
 62
 63ddcot031 comparetotal  -20  -20  -> 0
 64ddcot032 comparetotal  -20  -10  -> -1
 65ddcot033 comparetotal  -20   00  -> -1
 66ddcot034 comparetotal  -20   10  -> -1
 67ddcot035 comparetotal  -20   20  -> -1
 68ddcot036 comparetotal  -10  -20  -> 1
 69ddcot037 comparetotal  -10  -10  -> 0
 70ddcot038 comparetotal  -10   00  -> -1
 71ddcot039 comparetotal  -10   10  -> -1
 72ddcot040 comparetotal  -10   20  -> -1
 73ddcot041 comparetotal   00  -20  -> 1
 74ddcot042 comparetotal   00  -10  -> 1
 75ddcot043 comparetotal   00   00  -> 0
 76ddcot044 comparetotal   00   10  -> -1
 77ddcot045 comparetotal   00   20  -> -1
 78ddcot046 comparetotal   10  -20  -> 1
 79ddcot047 comparetotal   10  -10  -> 1
 80ddcot048 comparetotal   10   00  -> 1
 81ddcot049 comparetotal   10   10  -> 0
 82ddcot050 comparetotal   10   20  -> -1
 83ddcot051 comparetotal   20  -20  -> 1
 84ddcot052 comparetotal   20  -10  -> 1
 85ddcot053 comparetotal   20   00  -> 1
 86ddcot055 comparetotal   20   10  -> 1
 87ddcot056 comparetotal   20   20  -> 0
 88
 89ddcot061 comparetotal  -2.0  -2.0  -> 0
 90ddcot062 comparetotal  -2.0  -1.0  -> -1
 91ddcot063 comparetotal  -2.0   0.0  -> -1
 92ddcot064 comparetotal  -2.0   1.0  -> -1
 93ddcot065 comparetotal  -2.0   2.0  -> -1
 94ddcot066 comparetotal  -1.0  -2.0  -> 1
 95ddcot067 comparetotal  -1.0  -1.0  -> 0
 96ddcot068 comparetotal  -1.0   0.0  -> -1
 97ddcot069 comparetotal  -1.0   1.0  -> -1
 98ddcot070 comparetotal  -1.0   2.0  -> -1
 99ddcot071 comparetotal   0.0  -2.0  -> 1
100ddcot072 comparetotal   0.0  -1.0  -> 1
101ddcot073 comparetotal   0.0   0.0  -> 0
102ddcot074 comparetotal   0.0   1.0  -> -1
103ddcot075 comparetotal   0.0   2.0  -> -1
104ddcot076 comparetotal   1.0  -2.0  -> 1
105ddcot077 comparetotal   1.0  -1.0  -> 1
106ddcot078 comparetotal   1.0   0.0  -> 1
107ddcot079 comparetotal   1.0   1.0  -> 0
108ddcot080 comparetotal   1.0   2.0  -> -1
109ddcot081 comparetotal   2.0  -2.0  -> 1
110ddcot082 comparetotal   2.0  -1.0  -> 1
111ddcot083 comparetotal   2.0   0.0  -> 1
112ddcot085 comparetotal   2.0   1.0  -> 1
113ddcot086 comparetotal   2.0   2.0  -> 0
114
115-- now some cases which might overflow if subtract were used
116ddcot090 comparetotal  9.99999999E+384 9.99999999E+384  -> 0
117ddcot091 comparetotal -9.99999999E+384 9.99999999E+384  -> -1
118ddcot092 comparetotal  9.99999999E+384 -9.99999999E+384 -> 1
119ddcot093 comparetotal -9.99999999E+384 -9.99999999E+384 -> 0
120
121-- some differing length/exponent cases
122-- in this first group, compare would compare all equal
123ddcot100 comparetotal   7.0    7.0    -> 0
124ddcot101 comparetotal   7.0    7      -> -1
125ddcot102 comparetotal   7      7.0    -> 1
126ddcot103 comparetotal   7E+0   7.0    -> 1
127ddcot104 comparetotal   70E-1  7.0    -> 0
128ddcot105 comparetotal   0.7E+1 7      -> 0
129ddcot106 comparetotal   70E-1  7      -> -1
130ddcot107 comparetotal   7.0    7E+0   -> -1
131ddcot108 comparetotal   7.0    70E-1  -> 0
132ddcot109 comparetotal   7      0.7E+1 -> 0
133ddcot110 comparetotal   7      70E-1  -> 1
134
135ddcot120 comparetotal   8.0    7.0    -> 1
136ddcot121 comparetotal   8.0    7      -> 1
137ddcot122 comparetotal   8      7.0    -> 1
138ddcot123 comparetotal   8E+0   7.0    -> 1
139ddcot124 comparetotal   80E-1  7.0    -> 1
140ddcot125 comparetotal   0.8E+1 7      -> 1
141ddcot126 comparetotal   80E-1  7      -> 1
142ddcot127 comparetotal   8.0    7E+0   -> 1
143ddcot128 comparetotal   8.0    70E-1  -> 1
144ddcot129 comparetotal   8      0.7E+1  -> 1
145ddcot130 comparetotal   8      70E-1  -> 1
146
147ddcot140 comparetotal   8.0    9.0    -> -1
148ddcot141 comparetotal   8.0    9      -> -1
149ddcot142 comparetotal   8      9.0    -> -1
150ddcot143 comparetotal   8E+0   9.0    -> -1
151ddcot144 comparetotal   80E-1  9.0    -> -1
152ddcot145 comparetotal   0.8E+1 9      -> -1
153ddcot146 comparetotal   80E-1  9      -> -1
154ddcot147 comparetotal   8.0    9E+0   -> -1
155ddcot148 comparetotal   8.0    90E-1  -> -1
156ddcot149 comparetotal   8      0.9E+1 -> -1
157ddcot150 comparetotal   8      90E-1  -> -1
158
159-- and again, with sign changes -+ ..
160ddcot200 comparetotal  -7.0    7.0    -> -1
161ddcot201 comparetotal  -7.0    7      -> -1
162ddcot202 comparetotal  -7      7.0    -> -1
163ddcot203 comparetotal  -7E+0   7.0    -> -1
164ddcot204 comparetotal  -70E-1  7.0    -> -1
165ddcot205 comparetotal  -0.7E+1 7      -> -1
166ddcot206 comparetotal  -70E-1  7      -> -1
167ddcot207 comparetotal  -7.0    7E+0   -> -1
168ddcot208 comparetotal  -7.0    70E-1  -> -1
169ddcot209 comparetotal  -7      0.7E+1 -> -1
170ddcot210 comparetotal  -7      70E-1  -> -1
171
172ddcot220 comparetotal  -8.0    7.0    -> -1
173ddcot221 comparetotal  -8.0    7      -> -1
174ddcot222 comparetotal  -8      7.0    -> -1
175ddcot223 comparetotal  -8E+0   7.0    -> -1
176ddcot224 comparetotal  -80E-1  7.0    -> -1
177ddcot225 comparetotal  -0.8E+1 7      -> -1
178ddcot226 comparetotal  -80E-1  7      -> -1
179ddcot227 comparetotal  -8.0    7E+0   -> -1
180ddcot228 comparetotal  -8.0    70E-1  -> -1
181ddcot229 comparetotal  -8      0.7E+1 -> -1
182ddcot230 comparetotal  -8      70E-1  -> -1
183
184ddcot240 comparetotal  -8.0    9.0    -> -1
185ddcot241 comparetotal  -8.0    9      -> -1
186ddcot242 comparetotal  -8      9.0    -> -1
187ddcot243 comparetotal  -8E+0   9.0    -> -1
188ddcot244 comparetotal  -80E-1  9.0    -> -1
189ddcot245 comparetotal  -0.8E+1 9      -> -1
190ddcot246 comparetotal  -80E-1  9      -> -1
191ddcot247 comparetotal  -8.0    9E+0   -> -1
192ddcot248 comparetotal  -8.0    90E-1  -> -1
193ddcot249 comparetotal  -8      0.9E+1 -> -1
194ddcot250 comparetotal  -8      90E-1  -> -1
195
196-- and again, with sign changes +- ..
197ddcot300 comparetotal   7.0    -7.0    -> 1
198ddcot301 comparetotal   7.0    -7      -> 1
199ddcot302 comparetotal   7      -7.0    -> 1
200ddcot303 comparetotal   7E+0   -7.0    -> 1
201ddcot304 comparetotal   70E-1  -7.0    -> 1
202ddcot305 comparetotal   .7E+1  -7      -> 1
203ddcot306 comparetotal   70E-1  -7      -> 1
204ddcot307 comparetotal   7.0    -7E+0   -> 1
205ddcot308 comparetotal   7.0    -70E-1  -> 1
206ddcot309 comparetotal   7      -.7E+1  -> 1
207ddcot310 comparetotal   7      -70E-1  -> 1
208
209ddcot320 comparetotal   8.0    -7.0    -> 1
210ddcot321 comparetotal   8.0    -7      -> 1
211ddcot322 comparetotal   8      -7.0    -> 1
212ddcot323 comparetotal   8E+0   -7.0    -> 1
213ddcot324 comparetotal   80E-1  -7.0    -> 1
214ddcot325 comparetotal   .8E+1  -7      -> 1
215ddcot326 comparetotal   80E-1  -7      -> 1
216ddcot327 comparetotal   8.0    -7E+0   -> 1
217ddcot328 comparetotal   8.0    -70E-1  -> 1
218ddcot329 comparetotal   8      -.7E+1  -> 1
219ddcot330 comparetotal   8      -70E-1  -> 1
220
221ddcot340 comparetotal   8.0    -9.0    -> 1
222ddcot341 comparetotal   8.0    -9      -> 1
223ddcot342 comparetotal   8      -9.0    -> 1
224ddcot343 comparetotal   8E+0   -9.0    -> 1
225ddcot344 comparetotal   80E-1  -9.0    -> 1
226ddcot345 comparetotal   .8E+1  -9      -> 1
227ddcot346 comparetotal   80E-1  -9      -> 1
228ddcot347 comparetotal   8.0    -9E+0   -> 1
229ddcot348 comparetotal   8.0    -90E-1  -> 1
230ddcot349 comparetotal   8      -.9E+1  -> 1
231ddcot350 comparetotal   8      -90E-1  -> 1
232
233-- and again, with sign changes -- ..
234ddcot400 comparetotal   -7.0    -7.0    -> 0
235ddcot401 comparetotal   -7.0    -7      -> 1
236ddcot402 comparetotal   -7      -7.0    -> -1
237ddcot403 comparetotal   -7E+0   -7.0    -> -1
238ddcot404 comparetotal   -70E-1  -7.0    -> 0
239ddcot405 comparetotal   -.7E+1  -7      -> 0
240ddcot406 comparetotal   -70E-1  -7      -> 1
241ddcot407 comparetotal   -7.0    -7E+0   -> 1
242ddcot408 comparetotal   -7.0    -70E-1  -> 0
243ddcot409 comparetotal   -7      -.7E+1  -> 0
244ddcot410 comparetotal   -7      -70E-1  -> -1
245
246ddcot420 comparetotal   -8.0    -7.0    -> -1
247ddcot421 comparetotal   -8.0    -7      -> -1
248ddcot422 comparetotal   -8      -7.0    -> -1
249ddcot423 comparetotal   -8E+0   -7.0    -> -1
250ddcot424 comparetotal   -80E-1  -7.0    -> -1
251ddcot425 comparetotal   -.8E+1  -7      -> -1
252ddcot426 comparetotal   -80E-1  -7      -> -1
253ddcot427 comparetotal   -8.0    -7E+0   -> -1
254ddcot428 comparetotal   -8.0    -70E-1  -> -1
255ddcot429 comparetotal   -8      -.7E+1  -> -1
256ddcot430 comparetotal   -8      -70E-1  -> -1
257
258ddcot440 comparetotal   -8.0    -9.0    -> 1
259ddcot441 comparetotal   -8.0    -9      -> 1
260ddcot442 comparetotal   -8      -9.0    -> 1
261ddcot443 comparetotal   -8E+0   -9.0    -> 1
262ddcot444 comparetotal   -80E-1  -9.0    -> 1
263ddcot445 comparetotal   -.8E+1  -9      -> 1
264ddcot446 comparetotal   -80E-1  -9      -> 1
265ddcot447 comparetotal   -8.0    -9E+0   -> 1
266ddcot448 comparetotal   -8.0    -90E-1  -> 1
267ddcot449 comparetotal   -8      -.9E+1  -> 1
268ddcot450 comparetotal   -8      -90E-1  -> 1
269
270
271-- testcases that subtract to lots of zeros at boundaries [pgr]
272ddcot473 comparetotal 123.4560000000000E-89 123.456E-89 -> -1
273ddcot474 comparetotal 123.456000000000E+89 123.456E+89 -> -1
274ddcot475 comparetotal 123.45600000000E-89 123.456E-89 -> -1
275ddcot476 comparetotal 123.4560000000E+89 123.456E+89 -> -1
276ddcot477 comparetotal 123.456000000E-89 123.456E-89 -> -1
277ddcot478 comparetotal 123.45600000E+89 123.456E+89 -> -1
278ddcot479 comparetotal 123.4560000E-89 123.456E-89 -> -1
279ddcot480 comparetotal 123.456000E+89 123.456E+89 -> -1
280ddcot481 comparetotal 123.45600E-89 123.456E-89 -> -1
281ddcot482 comparetotal 123.4560E+89 123.456E+89 -> -1
282ddcot483 comparetotal 123.456E-89 123.456E-89 -> 0
283ddcot487 comparetotal 123.456E+89 123.4560000000000E+89 -> 1
284ddcot488 comparetotal 123.456E-89 123.456000000000E-89 -> 1
285ddcot489 comparetotal 123.456E+89 123.45600000000E+89 -> 1
286ddcot490 comparetotal 123.456E-89 123.4560000000E-89 -> 1
287ddcot491 comparetotal 123.456E+89 123.456000000E+89 -> 1
288ddcot492 comparetotal 123.456E-89 123.45600000E-89 -> 1
289ddcot493 comparetotal 123.456E+89 123.4560000E+89 -> 1
290ddcot494 comparetotal 123.456E-89 123.456000E-89 -> 1
291ddcot495 comparetotal 123.456E+89 123.45600E+89 -> 1
292ddcot496 comparetotal 123.456E-89 123.4560E-89 -> 1
293ddcot497 comparetotal 123.456E+89 123.456E+89 -> 0
294
295-- wide-ranging, around precision; signs equal
296ddcot498 comparetotal    1     1E-17    -> 1
297ddcot499 comparetotal    1     1E-16    -> 1
298ddcot500 comparetotal    1     1E-15    -> 1
299ddcot501 comparetotal    1     1E-14    -> 1
300ddcot502 comparetotal    1     1E-13    -> 1
301ddcot503 comparetotal    1     1E-12    -> 1
302ddcot504 comparetotal    1     1E-11    -> 1
303ddcot505 comparetotal    1     1E-10    -> 1
304ddcot506 comparetotal    1     1E-9     -> 1
305ddcot507 comparetotal    1     1E-8     -> 1
306ddcot508 comparetotal    1     1E-7     -> 1
307ddcot509 comparetotal    1     1E-6     -> 1
308ddcot510 comparetotal    1     1E-5     -> 1
309ddcot511 comparetotal    1     1E-4     -> 1
310ddcot512 comparetotal    1     1E-3     -> 1
311ddcot513 comparetotal    1     1E-2     -> 1
312ddcot514 comparetotal    1     1E-1     -> 1
313ddcot515 comparetotal    1     1E-0     -> 0
314ddcot516 comparetotal    1     1E+1     -> -1
315ddcot517 comparetotal    1     1E+2     -> -1
316ddcot518 comparetotal    1     1E+3     -> -1
317ddcot519 comparetotal    1     1E+4     -> -1
318ddcot521 comparetotal    1     1E+5     -> -1
319ddcot522 comparetotal    1     1E+6     -> -1
320ddcot523 comparetotal    1     1E+7     -> -1
321ddcot524 comparetotal    1     1E+8     -> -1
322ddcot525 comparetotal    1     1E+9     -> -1
323ddcot526 comparetotal    1     1E+10    -> -1
324ddcot527 comparetotal    1     1E+11    -> -1
325ddcot528 comparetotal    1     1E+12    -> -1
326ddcot529 comparetotal    1     1E+13    -> -1
327ddcot530 comparetotal    1     1E+14    -> -1
328ddcot531 comparetotal    1     1E+15    -> -1
329ddcot532 comparetotal    1     1E+16    -> -1
330ddcot533 comparetotal    1     1E+17    -> -1
331-- LR swap
332ddcot538 comparetotal    1E-17  1       -> -1
333ddcot539 comparetotal    1E-16  1       -> -1
334ddcot540 comparetotal    1E-15  1       -> -1
335ddcot541 comparetotal    1E-14  1       -> -1
336ddcot542 comparetotal    1E-13  1       -> -1
337ddcot543 comparetotal    1E-12  1       -> -1
338ddcot544 comparetotal    1E-11  1       -> -1
339ddcot545 comparetotal    1E-10  1       -> -1
340ddcot546 comparetotal    1E-9   1       -> -1
341ddcot547 comparetotal    1E-8   1       -> -1
342ddcot548 comparetotal    1E-7   1       -> -1
343ddcot549 comparetotal    1E-6   1       -> -1
344ddcot550 comparetotal    1E-5   1       -> -1
345ddcot551 comparetotal    1E-4   1       -> -1
346ddcot552 comparetotal    1E-3   1       -> -1
347ddcot553 comparetotal    1E-2   1       -> -1
348ddcot554 comparetotal    1E-1   1       -> -1
349ddcot555 comparetotal    1E-0   1       ->  0
350ddcot556 comparetotal    1E+1   1       ->  1
351ddcot557 comparetotal    1E+2   1       ->  1
352ddcot558 comparetotal    1E+3   1       ->  1
353ddcot559 comparetotal    1E+4   1       ->  1
354ddcot561 comparetotal    1E+5   1       ->  1
355ddcot562 comparetotal    1E+6   1       ->  1
356ddcot563 comparetotal    1E+7   1       ->  1
357ddcot564 comparetotal    1E+8   1       ->  1
358ddcot565 comparetotal    1E+9   1       ->  1
359ddcot566 comparetotal    1E+10  1       ->  1
360ddcot567 comparetotal    1E+11  1       ->  1
361ddcot568 comparetotal    1E+12  1       ->  1
362ddcot569 comparetotal    1E+13  1       ->  1
363ddcot570 comparetotal    1E+14  1       ->  1
364ddcot571 comparetotal    1E+15  1       ->  1
365ddcot572 comparetotal    1E+16  1       ->  1
366ddcot573 comparetotal    1E+17  1       ->  1
367-- similar with a useful coefficient, one side only
368ddcot578 comparetotal  0.000000987654321     1E-17    -> 1
369ddcot579 comparetotal  0.000000987654321     1E-16    -> 1
370ddcot580 comparetotal  0.000000987654321     1E-15    -> 1
371ddcot581 comparetotal  0.000000987654321     1E-14    -> 1
372ddcot582 comparetotal  0.000000987654321     1E-13    -> 1
373ddcot583 comparetotal  0.000000987654321     1E-12    -> 1
374ddcot584 comparetotal  0.000000987654321     1E-11    -> 1
375ddcot585 comparetotal  0.000000987654321     1E-10    -> 1
376ddcot586 comparetotal  0.000000987654321     1E-9     -> 1
377ddcot587 comparetotal  0.000000987654321     1E-8     -> 1
378ddcot588 comparetotal  0.000000987654321     1E-7     -> 1
379ddcot589 comparetotal  0.000000987654321     1E-6     -> -1
380ddcot590 comparetotal  0.000000987654321     1E-5     -> -1
381ddcot591 comparetotal  0.000000987654321     1E-4     -> -1
382ddcot592 comparetotal  0.000000987654321     1E-3     -> -1
383ddcot593 comparetotal  0.000000987654321     1E-2     -> -1
384ddcot594 comparetotal  0.000000987654321     1E-1     -> -1
385ddcot595 comparetotal  0.000000987654321     1E-0     -> -1
386ddcot596 comparetotal  0.000000987654321     1E+1     -> -1
387ddcot597 comparetotal  0.000000987654321     1E+2     -> -1
388ddcot598 comparetotal  0.000000987654321     1E+3     -> -1
389ddcot599 comparetotal  0.000000987654321     1E+4     -> -1
390
391-- check some unit-y traps
392ddcot600 comparetotal   12            12.2345 -> -1
393ddcot601 comparetotal   12.0          12.2345 -> -1
394ddcot602 comparetotal   12.00         12.2345 -> -1
395ddcot603 comparetotal   12.000        12.2345 -> -1
396ddcot604 comparetotal   12.0000       12.2345 -> -1
397ddcot605 comparetotal   12.00000      12.2345 -> -1
398ddcot606 comparetotal   12.000000     12.2345 -> -1
399ddcot607 comparetotal   12.0000000    12.2345 -> -1
400ddcot608 comparetotal   12.00000000   12.2345 -> -1
401ddcot609 comparetotal   12.000000000  12.2345 -> -1
402ddcot610 comparetotal   12.1234 12            ->  1
403ddcot611 comparetotal   12.1234 12.0          ->  1
404ddcot612 comparetotal   12.1234 12.00         ->  1
405ddcot613 comparetotal   12.1234 12.000        ->  1
406ddcot614 comparetotal   12.1234 12.0000       ->  1
407ddcot615 comparetotal   12.1234 12.00000      ->  1
408ddcot616 comparetotal   12.1234 12.000000     ->  1
409ddcot617 comparetotal   12.1234 12.0000000    ->  1
410ddcot618 comparetotal   12.1234 12.00000000   ->  1
411ddcot619 comparetotal   12.1234 12.000000000  ->  1
412ddcot620 comparetotal  -12           -12.2345 ->  1
413ddcot621 comparetotal  -12.0         -12.2345 ->  1
414ddcot622 comparetotal  -12.00        -12.2345 ->  1
415ddcot623 comparetotal  -12.000       -12.2345 ->  1
416ddcot624 comparetotal  -12.0000      -12.2345 ->  1
417ddcot625 comparetotal  -12.00000     -12.2345 ->  1
418ddcot626 comparetotal  -12.000000    -12.2345 ->  1
419ddcot627 comparetotal  -12.0000000   -12.2345 ->  1
420ddcot628 comparetotal  -12.00000000  -12.2345 ->  1
421ddcot629 comparetotal  -12.000000000 -12.2345 ->  1
422ddcot630 comparetotal  -12.1234 -12           -> -1
423ddcot631 comparetotal  -12.1234 -12.0         -> -1
424ddcot632 comparetotal  -12.1234 -12.00        -> -1
425ddcot633 comparetotal  -12.1234 -12.000       -> -1
426ddcot634 comparetotal  -12.1234 -12.0000      -> -1
427ddcot635 comparetotal  -12.1234 -12.00000     -> -1
428ddcot636 comparetotal  -12.1234 -12.000000    -> -1
429ddcot637 comparetotal  -12.1234 -12.0000000   -> -1
430ddcot638 comparetotal  -12.1234 -12.00000000  -> -1
431ddcot639 comparetotal  -12.1234 -12.000000000 -> -1
432
433-- extended zeros
434ddcot640 comparetotal   0     0   -> 0
435ddcot641 comparetotal   0    -0   -> 1
436ddcot642 comparetotal   0    -0.0 -> 1
437ddcot643 comparetotal   0     0.0 -> 1
438ddcot644 comparetotal  -0     0   -> -1
439ddcot645 comparetotal  -0    -0   -> 0
440ddcot646 comparetotal  -0    -0.0 -> -1
441ddcot647 comparetotal  -0     0.0 -> -1
442ddcot648 comparetotal   0.0   0   -> -1
443ddcot649 comparetotal   0.0  -0   -> 1
444ddcot650 comparetotal   0.0  -0.0 -> 1
445ddcot651 comparetotal   0.0   0.0 -> 0
446ddcot652 comparetotal  -0.0   0   -> -1
447ddcot653 comparetotal  -0.0  -0   -> 1
448ddcot654 comparetotal  -0.0  -0.0 -> 0
449ddcot655 comparetotal  -0.0   0.0 -> -1
450
451ddcot656 comparetotal  -0E1   0.0 -> -1
452ddcot657 comparetotal  -0E2   0.0 -> -1
453ddcot658 comparetotal   0E1   0.0 -> 1
454ddcot659 comparetotal   0E2   0.0 -> 1
455ddcot660 comparetotal  -0E1   0   -> -1
456ddcot661 comparetotal  -0E2   0   -> -1
457ddcot662 comparetotal   0E1   0   -> 1
458ddcot663 comparetotal   0E2   0   -> 1
459ddcot664 comparetotal  -0E1  -0E1 -> 0
460ddcot665 comparetotal  -0E2  -0E1 -> -1
461ddcot666 comparetotal   0E1  -0E1 -> 1
462ddcot667 comparetotal   0E2  -0E1 -> 1
463ddcot668 comparetotal  -0E1  -0E2 -> 1
464ddcot669 comparetotal  -0E2  -0E2 -> 0
465ddcot670 comparetotal   0E1  -0E2 -> 1
466ddcot671 comparetotal   0E2  -0E2 -> 1
467ddcot672 comparetotal  -0E1   0E1 -> -1
468ddcot673 comparetotal  -0E2   0E1 -> -1
469ddcot674 comparetotal   0E1   0E1 -> 0
470ddcot675 comparetotal   0E2   0E1 -> 1
471ddcot676 comparetotal  -0E1   0E2 -> -1
472ddcot677 comparetotal  -0E2   0E2 -> -1
473ddcot678 comparetotal   0E1   0E2 -> -1
474ddcot679 comparetotal   0E2   0E2 -> 0
475
476-- trailing zeros; unit-y
477ddcot680 comparetotal   12    12           -> 0
478ddcot681 comparetotal   12    12.0         -> 1
479ddcot682 comparetotal   12    12.00        -> 1
480ddcot683 comparetotal   12    12.000       -> 1
481ddcot684 comparetotal   12    12.0000      -> 1
482ddcot685 comparetotal   12    12.00000     -> 1
483ddcot686 comparetotal   12    12.000000    -> 1
484ddcot687 comparetotal   12    12.0000000   -> 1
485ddcot688 comparetotal   12    12.00000000  -> 1
486ddcot689 comparetotal   12    12.000000000 -> 1
487ddcot690 comparetotal   12              12 -> 0
488ddcot691 comparetotal   12.0            12 -> -1
489ddcot692 comparetotal   12.00           12 -> -1
490ddcot693 comparetotal   12.000          12 -> -1
491ddcot694 comparetotal   12.0000         12 -> -1
492ddcot695 comparetotal   12.00000        12 -> -1
493ddcot696 comparetotal   12.000000       12 -> -1
494ddcot697 comparetotal   12.0000000      12 -> -1
495ddcot698 comparetotal   12.00000000     12 -> -1
496ddcot699 comparetotal   12.000000000    12 -> -1
497
498-- old long operand checks
499ddcot701 comparetotal 12345678000  1 ->  1
500ddcot702 comparetotal 1 12345678000  -> -1
501ddcot703 comparetotal 1234567800   1 ->  1
502ddcot704 comparetotal 1 1234567800   -> -1
503ddcot705 comparetotal 1234567890   1 ->  1
504ddcot706 comparetotal 1 1234567890   -> -1
505ddcot707 comparetotal 1234567891   1 ->  1
506ddcot708 comparetotal 1 1234567891   -> -1
507ddcot709 comparetotal 12345678901  1 ->  1
508ddcot710 comparetotal 1 12345678901  -> -1
509ddcot711 comparetotal 1234567896   1 ->  1
510ddcot712 comparetotal 1 1234567896   -> -1
511ddcot713 comparetotal -1234567891  1 -> -1
512ddcot714 comparetotal 1 -1234567891  ->  1
513ddcot715 comparetotal -12345678901 1 -> -1
514ddcot716 comparetotal 1 -12345678901 ->  1
515ddcot717 comparetotal -1234567896  1 -> -1
516ddcot718 comparetotal 1 -1234567896  ->  1
517
518-- old residue cases
519ddcot740 comparetotal  1  0.9999999  -> 1
520ddcot741 comparetotal  1  0.999999   -> 1
521ddcot742 comparetotal  1  0.99999    -> 1
522ddcot743 comparetotal  1  1.0000     -> 1
523ddcot744 comparetotal  1  1.00001    -> -1
524ddcot745 comparetotal  1  1.000001   -> -1
525ddcot746 comparetotal  1  1.0000001  -> -1
526ddcot750 comparetotal  0.9999999  1  -> -1
527ddcot751 comparetotal  0.999999   1  -> -1
528ddcot752 comparetotal  0.99999    1  -> -1
529ddcot753 comparetotal  1.0000     1  -> -1
530ddcot754 comparetotal  1.00001    1  -> 1
531ddcot755 comparetotal  1.000001   1  -> 1
532ddcot756 comparetotal  1.0000001  1  -> 1
533
534-- Specials
535ddcot780 comparetotal  Inf  -Inf   ->  1
536ddcot781 comparetotal  Inf  -1000  ->  1
537ddcot782 comparetotal  Inf  -1     ->  1
538ddcot783 comparetotal  Inf  -0     ->  1
539ddcot784 comparetotal  Inf   0     ->  1
540ddcot785 comparetotal  Inf   1     ->  1
541ddcot786 comparetotal  Inf   1000  ->  1
542ddcot787 comparetotal  Inf   Inf   ->  0
543ddcot788 comparetotal -1000  Inf   -> -1
544ddcot789 comparetotal -Inf   Inf   -> -1
545ddcot790 comparetotal -1     Inf   -> -1
546ddcot791 comparetotal -0     Inf   -> -1
547ddcot792 comparetotal  0     Inf   -> -1
548ddcot793 comparetotal  1     Inf   -> -1
549ddcot794 comparetotal  1000  Inf   -> -1
550ddcot795 comparetotal  Inf   Inf   ->  0
551
552ddcot800 comparetotal -Inf  -Inf   ->  0
553ddcot801 comparetotal -Inf  -1000  -> -1
554ddcot802 comparetotal -Inf  -1     -> -1
555ddcot803 comparetotal -Inf  -0     -> -1
556ddcot804 comparetotal -Inf   0     -> -1
557ddcot805 comparetotal -Inf   1     -> -1
558ddcot806 comparetotal -Inf   1000  -> -1
559ddcot807 comparetotal -Inf   Inf   -> -1
560ddcot808 comparetotal -Inf  -Inf   ->  0
561ddcot809 comparetotal -1000 -Inf   ->  1
562ddcot810 comparetotal -1    -Inf   ->  1
563ddcot811 comparetotal -0    -Inf   ->  1
564ddcot812 comparetotal  0    -Inf   ->  1
565ddcot813 comparetotal  1    -Inf   ->  1
566ddcot814 comparetotal  1000 -Inf   ->  1
567ddcot815 comparetotal  Inf  -Inf   ->  1
568
569ddcot821 comparetotal  NaN -Inf    ->  1
570ddcot822 comparetotal  NaN -1000   ->  1
571ddcot823 comparetotal  NaN -1      ->  1
572ddcot824 comparetotal  NaN -0      ->  1
573ddcot825 comparetotal  NaN  0      ->  1
574ddcot826 comparetotal  NaN  1      ->  1
575ddcot827 comparetotal  NaN  1000   ->  1
576ddcot828 comparetotal  NaN  Inf    ->  1
577ddcot829 comparetotal  NaN  NaN    ->  0
578ddcot830 comparetotal -Inf  NaN    ->  -1
579ddcot831 comparetotal -1000 NaN    ->  -1
580ddcot832 comparetotal -1    NaN    ->  -1
581ddcot833 comparetotal -0    NaN    ->  -1
582ddcot834 comparetotal  0    NaN    ->  -1
583ddcot835 comparetotal  1    NaN    ->  -1
584ddcot836 comparetotal  1000 NaN    ->  -1
585ddcot837 comparetotal  Inf  NaN    ->  -1
586ddcot838 comparetotal -NaN -NaN    ->  0
587ddcot839 comparetotal +NaN -NaN    ->  1
588ddcot840 comparetotal -NaN +NaN    ->  -1
589
590ddcot841 comparetotal  sNaN -sNaN  ->  1
591ddcot842 comparetotal  sNaN -NaN   ->  1
592ddcot843 comparetotal  sNaN -Inf   ->  1
593ddcot844 comparetotal  sNaN -1000  ->  1
594ddcot845 comparetotal  sNaN -1     ->  1
595ddcot846 comparetotal  sNaN -0     ->  1
596ddcot847 comparetotal  sNaN  0     ->  1
597ddcot848 comparetotal  sNaN  1     ->  1
598ddcot849 comparetotal  sNaN  1000  ->  1
599ddcot850 comparetotal  sNaN  NaN   ->  -1
600ddcot851 comparetotal  sNaN sNaN   ->  0
601
602ddcot852 comparetotal -sNaN sNaN   ->  -1
603ddcot853 comparetotal -NaN  sNaN   ->  -1
604ddcot854 comparetotal -Inf  sNaN   ->  -1
605ddcot855 comparetotal -1000 sNaN   ->  -1
606ddcot856 comparetotal -1    sNaN   ->  -1
607ddcot857 comparetotal -0    sNaN   ->  -1
608ddcot858 comparetotal  0    sNaN   ->  -1
609ddcot859 comparetotal  1    sNaN   ->  -1
610ddcot860 comparetotal  1000 sNaN   ->  -1
611ddcot861 comparetotal  Inf  sNaN   ->  -1
612ddcot862 comparetotal  NaN  sNaN   ->  1
613ddcot863 comparetotal  sNaN sNaN   ->  0
614
615ddcot871 comparetotal  -sNaN -sNaN  ->  0
616ddcot872 comparetotal  -sNaN -NaN   ->  1
617ddcot873 comparetotal  -sNaN -Inf   ->  -1
618ddcot874 comparetotal  -sNaN -1000  ->  -1
619ddcot875 comparetotal  -sNaN -1     ->  -1
620ddcot876 comparetotal  -sNaN -0     ->  -1
621ddcot877 comparetotal  -sNaN  0     ->  -1
622ddcot878 comparetotal  -sNaN  1     ->  -1
623ddcot879 comparetotal  -sNaN  1000  ->  -1
624ddcot880 comparetotal  -sNaN  NaN   ->  -1
625ddcot881 comparetotal  -sNaN sNaN   ->  -1
626
627ddcot882 comparetotal -sNaN -sNaN   ->  0
628ddcot883 comparetotal -NaN  -sNaN   ->  -1
629ddcot884 comparetotal -Inf  -sNaN   ->  1
630ddcot885 comparetotal -1000 -sNaN   ->  1
631ddcot886 comparetotal -1    -sNaN   ->  1
632ddcot887 comparetotal -0    -sNaN   ->  1
633ddcot888 comparetotal  0    -sNaN   ->  1
634ddcot889 comparetotal  1    -sNaN   ->  1
635ddcot890 comparetotal  1000 -sNaN   ->  1
636ddcot891 comparetotal  Inf  -sNaN   ->  1
637ddcot892 comparetotal  NaN  -sNaN   ->  1
638ddcot893 comparetotal  sNaN -sNaN   ->  1
639
640-- NaNs with payload
641ddcot960 comparetotal  NaN9 -Inf   ->  1
642ddcot961 comparetotal  NaN8  999   ->  1
643ddcot962 comparetotal  NaN77 Inf   ->  1
644ddcot963 comparetotal -NaN67 NaN5  ->  -1
645ddcot964 comparetotal -Inf  -NaN4  ->  1
646ddcot965 comparetotal -999  -NaN33 ->  1
647ddcot966 comparetotal  Inf   NaN2  ->  -1
648
649ddcot970 comparetotal -NaN41 -NaN42 -> 1
650ddcot971 comparetotal +NaN41 -NaN42 -> 1
651ddcot972 comparetotal -NaN41 +NaN42 -> -1
652ddcot973 comparetotal +NaN41 +NaN42 -> -1
653ddcot974 comparetotal -NaN42 -NaN01 -> -1
654ddcot975 comparetotal +NaN42 -NaN01 ->  1
655ddcot976 comparetotal -NaN42 +NaN01 -> -1
656ddcot977 comparetotal +NaN42 +NaN01 ->  1
657
658ddcot980 comparetotal -sNaN771 -sNaN772 -> 1
659ddcot981 comparetotal +sNaN771 -sNaN772 -> 1
660ddcot982 comparetotal -sNaN771 +sNaN772 -> -1
661ddcot983 comparetotal +sNaN771 +sNaN772 -> -1
662ddcot984 comparetotal -sNaN772 -sNaN771 -> -1
663ddcot985 comparetotal +sNaN772 -sNaN771 ->  1
664ddcot986 comparetotal -sNaN772 +sNaN771 -> -1
665ddcot987 comparetotal +sNaN772 +sNaN771 ->  1
666
667ddcot991 comparetotal -sNaN99 -Inf    -> -1
668ddcot992 comparetotal  sNaN98 -11     ->  1
669ddcot993 comparetotal  sNaN97  NaN    -> -1
670ddcot994 comparetotal  sNaN16 sNaN94  -> -1
671ddcot995 comparetotal  NaN85  sNaN83  ->  1
672ddcot996 comparetotal -Inf    sNaN92  -> -1
673ddcot997 comparetotal  088    sNaN81  -> -1
674ddcot998 comparetotal  Inf    sNaN90  -> -1
675ddcot999 comparetotal  NaN   -sNaN89  ->  1
676
677-- spread zeros
678ddcot1110 comparetotal   0E-383  0       -> -1
679ddcot1111 comparetotal   0E-383 -0       ->  1
680ddcot1112 comparetotal  -0E-383  0       -> -1
681ddcot1113 comparetotal  -0E-383 -0       ->  1
682ddcot1114 comparetotal   0E-383  0E+384  -> -1
683ddcot1115 comparetotal   0E-383 -0E+384  ->  1
684ddcot1116 comparetotal  -0E-383  0E+384  -> -1
685ddcot1117 comparetotal  -0E-383 -0E+384  ->  1
686ddcot1118 comparetotal   0       0E+384  -> -1
687ddcot1119 comparetotal   0      -0E+384  ->  1
688ddcot1120 comparetotal  -0       0E+384  -> -1
689ddcot1121 comparetotal  -0      -0E+384  ->  1
690
691ddcot1130 comparetotal   0E+384  0       ->  1
692ddcot1131 comparetotal   0E+384 -0       ->  1
693ddcot1132 comparetotal  -0E+384  0       -> -1
694ddcot1133 comparetotal  -0E+384 -0       -> -1
695ddcot1134 comparetotal   0E+384  0E-383  ->  1
696ddcot1135 comparetotal   0E+384 -0E-383  ->  1
697ddcot1136 comparetotal  -0E+384  0E-383  -> -1
698ddcot1137 comparetotal  -0E+384 -0E-383  -> -1
699ddcot1138 comparetotal   0       0E-383  ->  1
700ddcot1139 comparetotal   0      -0E-383  ->  1
701ddcot1140 comparetotal  -0       0E-383  -> -1
702ddcot1141 comparetotal  -0      -0E-383  -> -1
703
704-- Null tests
705ddcot9990 comparetotal 10  # -> NaN Invalid_operation
706ddcot9991 comparetotal  # 10 -> NaN Invalid_operation