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