symbian-qemu-0.9.1-12/python-win32-2.6.1/lib/test/decimaltestdata/ddCompare.decTest
changeset 1 2fb8b9db1c86
equal deleted inserted replaced
0:ffa851df0825 1:2fb8b9db1c86
       
     1 ------------------------------------------------------------------------
       
     2 -- ddCompare.decTest -- decDouble 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 ------------------------------------------------------------------------
       
    20 version: 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 
       
    26 -- All operands and results are decDoubles.
       
    27 precision:   16
       
    28 maxExponent: 384
       
    29 minExponent: -383
       
    30 extended:    1
       
    31 clamp:       1
       
    32 rounding:    half_even
       
    33 
       
    34 -- sanity checks
       
    35 ddcom001 compare  -2  -2  -> 0
       
    36 ddcom002 compare  -2  -1  -> -1
       
    37 ddcom003 compare  -2   0  -> -1
       
    38 ddcom004 compare  -2   1  -> -1
       
    39 ddcom005 compare  -2   2  -> -1
       
    40 ddcom006 compare  -1  -2  -> 1
       
    41 ddcom007 compare  -1  -1  -> 0
       
    42 ddcom008 compare  -1   0  -> -1
       
    43 ddcom009 compare  -1   1  -> -1
       
    44 ddcom010 compare  -1   2  -> -1
       
    45 ddcom011 compare   0  -2  -> 1
       
    46 ddcom012 compare   0  -1  -> 1
       
    47 ddcom013 compare   0   0  -> 0
       
    48 ddcom014 compare   0   1  -> -1
       
    49 ddcom015 compare   0   2  -> -1
       
    50 ddcom016 compare   1  -2  -> 1
       
    51 ddcom017 compare   1  -1  -> 1
       
    52 ddcom018 compare   1   0  -> 1
       
    53 ddcom019 compare   1   1  -> 0
       
    54 ddcom020 compare   1   2  -> -1
       
    55 ddcom021 compare   2  -2  -> 1
       
    56 ddcom022 compare   2  -1  -> 1
       
    57 ddcom023 compare   2   0  -> 1
       
    58 ddcom025 compare   2   1  -> 1
       
    59 ddcom026 compare   2   2  -> 0
       
    60 
       
    61 ddcom031 compare  -20  -20  -> 0
       
    62 ddcom032 compare  -20  -10  -> -1
       
    63 ddcom033 compare  -20   00  -> -1
       
    64 ddcom034 compare  -20   10  -> -1
       
    65 ddcom035 compare  -20   20  -> -1
       
    66 ddcom036 compare  -10  -20  -> 1
       
    67 ddcom037 compare  -10  -10  -> 0
       
    68 ddcom038 compare  -10   00  -> -1
       
    69 ddcom039 compare  -10   10  -> -1
       
    70 ddcom040 compare  -10   20  -> -1
       
    71 ddcom041 compare   00  -20  -> 1
       
    72 ddcom042 compare   00  -10  -> 1
       
    73 ddcom043 compare   00   00  -> 0
       
    74 ddcom044 compare   00   10  -> -1
       
    75 ddcom045 compare   00   20  -> -1
       
    76 ddcom046 compare   10  -20  -> 1
       
    77 ddcom047 compare   10  -10  -> 1
       
    78 ddcom048 compare   10   00  -> 1
       
    79 ddcom049 compare   10   10  -> 0
       
    80 ddcom050 compare   10   20  -> -1
       
    81 ddcom051 compare   20  -20  -> 1
       
    82 ddcom052 compare   20  -10  -> 1
       
    83 ddcom053 compare   20   00  -> 1
       
    84 ddcom055 compare   20   10  -> 1
       
    85 ddcom056 compare   20   20  -> 0
       
    86 
       
    87 ddcom061 compare  -2.0  -2.0  -> 0
       
    88 ddcom062 compare  -2.0  -1.0  -> -1
       
    89 ddcom063 compare  -2.0   0.0  -> -1
       
    90 ddcom064 compare  -2.0   1.0  -> -1
       
    91 ddcom065 compare  -2.0   2.0  -> -1
       
    92 ddcom066 compare  -1.0  -2.0  -> 1
       
    93 ddcom067 compare  -1.0  -1.0  -> 0
       
    94 ddcom068 compare  -1.0   0.0  -> -1
       
    95 ddcom069 compare  -1.0   1.0  -> -1
       
    96 ddcom070 compare  -1.0   2.0  -> -1
       
    97 ddcom071 compare   0.0  -2.0  -> 1
       
    98 ddcom072 compare   0.0  -1.0  -> 1
       
    99 ddcom073 compare   0.0   0.0  -> 0
       
   100 ddcom074 compare   0.0   1.0  -> -1
       
   101 ddcom075 compare   0.0   2.0  -> -1
       
   102 ddcom076 compare   1.0  -2.0  -> 1
       
   103 ddcom077 compare   1.0  -1.0  -> 1
       
   104 ddcom078 compare   1.0   0.0  -> 1
       
   105 ddcom079 compare   1.0   1.0  -> 0
       
   106 ddcom080 compare   1.0   2.0  -> -1
       
   107 ddcom081 compare   2.0  -2.0  -> 1
       
   108 ddcom082 compare   2.0  -1.0  -> 1
       
   109 ddcom083 compare   2.0   0.0  -> 1
       
   110 ddcom085 compare   2.0   1.0  -> 1
       
   111 ddcom086 compare   2.0   2.0  -> 0
       
   112 ddcom087 compare   1.0   0.1  -> 1
       
   113 ddcom088 compare   0.1   1.0  -> -1
       
   114 
       
   115 -- now some cases which might overflow if subtract were used
       
   116 ddcom095 compare  9.999999999999999E+384 9.999999999999999E+384  -> 0
       
   117 ddcom096 compare -9.999999999999999E+384 9.999999999999999E+384  -> -1
       
   118 ddcom097 compare  9.999999999999999E+384 -9.999999999999999E+384 -> 1
       
   119 ddcom098 compare -9.999999999999999E+384 -9.999999999999999E+384 -> 0
       
   120 
       
   121 -- some differing length/exponent cases
       
   122 ddcom100 compare   7.0    7.0    -> 0
       
   123 ddcom101 compare   7.0    7      -> 0
       
   124 ddcom102 compare   7      7.0    -> 0
       
   125 ddcom103 compare   7E+0   7.0    -> 0
       
   126 ddcom104 compare   70E-1  7.0    -> 0
       
   127 ddcom105 compare   0.7E+1 7      -> 0
       
   128 ddcom106 compare   70E-1  7      -> 0
       
   129 ddcom107 compare   7.0    7E+0   -> 0
       
   130 ddcom108 compare   7.0    70E-1  -> 0
       
   131 ddcom109 compare   7      0.7E+1 -> 0
       
   132 ddcom110 compare   7      70E-1  -> 0
       
   133 
       
   134 ddcom120 compare   8.0    7.0    -> 1
       
   135 ddcom121 compare   8.0    7      -> 1
       
   136 ddcom122 compare   8      7.0    -> 1
       
   137 ddcom123 compare   8E+0   7.0    -> 1
       
   138 ddcom124 compare   80E-1  7.0    -> 1
       
   139 ddcom125 compare   0.8E+1 7      -> 1
       
   140 ddcom126 compare   80E-1  7      -> 1
       
   141 ddcom127 compare   8.0    7E+0   -> 1
       
   142 ddcom128 compare   8.0    70E-1  -> 1
       
   143 ddcom129 compare   8      0.7E+1  -> 1
       
   144 ddcom130 compare   8      70E-1  -> 1
       
   145 
       
   146 ddcom140 compare   8.0    9.0    -> -1
       
   147 ddcom141 compare   8.0    9      -> -1
       
   148 ddcom142 compare   8      9.0    -> -1
       
   149 ddcom143 compare   8E+0   9.0    -> -1
       
   150 ddcom144 compare   80E-1  9.0    -> -1
       
   151 ddcom145 compare   0.8E+1 9      -> -1
       
   152 ddcom146 compare   80E-1  9      -> -1
       
   153 ddcom147 compare   8.0    9E+0   -> -1
       
   154 ddcom148 compare   8.0    90E-1  -> -1
       
   155 ddcom149 compare   8      0.9E+1 -> -1
       
   156 ddcom150 compare   8      90E-1  -> -1
       
   157 
       
   158 -- and again, with sign changes -+ ..
       
   159 ddcom200 compare  -7.0    7.0    -> -1
       
   160 ddcom201 compare  -7.0    7      -> -1
       
   161 ddcom202 compare  -7      7.0    -> -1
       
   162 ddcom203 compare  -7E+0   7.0    -> -1
       
   163 ddcom204 compare  -70E-1  7.0    -> -1
       
   164 ddcom205 compare  -0.7E+1 7      -> -1
       
   165 ddcom206 compare  -70E-1  7      -> -1
       
   166 ddcom207 compare  -7.0    7E+0   -> -1
       
   167 ddcom208 compare  -7.0    70E-1  -> -1
       
   168 ddcom209 compare  -7      0.7E+1 -> -1
       
   169 ddcom210 compare  -7      70E-1  -> -1
       
   170 
       
   171 ddcom220 compare  -8.0    7.0    -> -1
       
   172 ddcom221 compare  -8.0    7      -> -1
       
   173 ddcom222 compare  -8      7.0    -> -1
       
   174 ddcom223 compare  -8E+0   7.0    -> -1
       
   175 ddcom224 compare  -80E-1  7.0    -> -1
       
   176 ddcom225 compare  -0.8E+1 7      -> -1
       
   177 ddcom226 compare  -80E-1  7      -> -1
       
   178 ddcom227 compare  -8.0    7E+0   -> -1
       
   179 ddcom228 compare  -8.0    70E-1  -> -1
       
   180 ddcom229 compare  -8      0.7E+1 -> -1
       
   181 ddcom230 compare  -8      70E-1  -> -1
       
   182 
       
   183 ddcom240 compare  -8.0    9.0    -> -1
       
   184 ddcom241 compare  -8.0    9      -> -1
       
   185 ddcom242 compare  -8      9.0    -> -1
       
   186 ddcom243 compare  -8E+0   9.0    -> -1
       
   187 ddcom244 compare  -80E-1  9.0    -> -1
       
   188 ddcom245 compare  -0.8E+1 9      -> -1
       
   189 ddcom246 compare  -80E-1  9      -> -1
       
   190 ddcom247 compare  -8.0    9E+0   -> -1
       
   191 ddcom248 compare  -8.0    90E-1  -> -1
       
   192 ddcom249 compare  -8      0.9E+1 -> -1
       
   193 ddcom250 compare  -8      90E-1  -> -1
       
   194 
       
   195 -- and again, with sign changes +- ..
       
   196 ddcom300 compare   7.0    -7.0    -> 1
       
   197 ddcom301 compare   7.0    -7      -> 1
       
   198 ddcom302 compare   7      -7.0    -> 1
       
   199 ddcom303 compare   7E+0   -7.0    -> 1
       
   200 ddcom304 compare   70E-1  -7.0    -> 1
       
   201 ddcom305 compare   .7E+1  -7      -> 1
       
   202 ddcom306 compare   70E-1  -7      -> 1
       
   203 ddcom307 compare   7.0    -7E+0   -> 1
       
   204 ddcom308 compare   7.0    -70E-1  -> 1
       
   205 ddcom309 compare   7      -.7E+1  -> 1
       
   206 ddcom310 compare   7      -70E-1  -> 1
       
   207 
       
   208 ddcom320 compare   8.0    -7.0    -> 1
       
   209 ddcom321 compare   8.0    -7      -> 1
       
   210 ddcom322 compare   8      -7.0    -> 1
       
   211 ddcom323 compare   8E+0   -7.0    -> 1
       
   212 ddcom324 compare   80E-1  -7.0    -> 1
       
   213 ddcom325 compare   .8E+1  -7      -> 1
       
   214 ddcom326 compare   80E-1  -7      -> 1
       
   215 ddcom327 compare   8.0    -7E+0   -> 1
       
   216 ddcom328 compare   8.0    -70E-1  -> 1
       
   217 ddcom329 compare   8      -.7E+1  -> 1
       
   218 ddcom330 compare   8      -70E-1  -> 1
       
   219 
       
   220 ddcom340 compare   8.0    -9.0    -> 1
       
   221 ddcom341 compare   8.0    -9      -> 1
       
   222 ddcom342 compare   8      -9.0    -> 1
       
   223 ddcom343 compare   8E+0   -9.0    -> 1
       
   224 ddcom344 compare   80E-1  -9.0    -> 1
       
   225 ddcom345 compare   .8E+1  -9      -> 1
       
   226 ddcom346 compare   80E-1  -9      -> 1
       
   227 ddcom347 compare   8.0    -9E+0   -> 1
       
   228 ddcom348 compare   8.0    -90E-1  -> 1
       
   229 ddcom349 compare   8      -.9E+1  -> 1
       
   230 ddcom350 compare   8      -90E-1  -> 1
       
   231 
       
   232 -- and again, with sign changes -- ..
       
   233 ddcom400 compare   -7.0    -7.0    -> 0
       
   234 ddcom401 compare   -7.0    -7      -> 0
       
   235 ddcom402 compare   -7      -7.0    -> 0
       
   236 ddcom403 compare   -7E+0   -7.0    -> 0
       
   237 ddcom404 compare   -70E-1  -7.0    -> 0
       
   238 ddcom405 compare   -.7E+1  -7      -> 0
       
   239 ddcom406 compare   -70E-1  -7      -> 0
       
   240 ddcom407 compare   -7.0    -7E+0   -> 0
       
   241 ddcom408 compare   -7.0    -70E-1  -> 0
       
   242 ddcom409 compare   -7      -.7E+1  -> 0
       
   243 ddcom410 compare   -7      -70E-1  -> 0
       
   244 
       
   245 ddcom420 compare   -8.0    -7.0    -> -1
       
   246 ddcom421 compare   -8.0    -7      -> -1
       
   247 ddcom422 compare   -8      -7.0    -> -1
       
   248 ddcom423 compare   -8E+0   -7.0    -> -1
       
   249 ddcom424 compare   -80E-1  -7.0    -> -1
       
   250 ddcom425 compare   -.8E+1  -7      -> -1
       
   251 ddcom426 compare   -80E-1  -7      -> -1
       
   252 ddcom427 compare   -8.0    -7E+0   -> -1
       
   253 ddcom428 compare   -8.0    -70E-1  -> -1
       
   254 ddcom429 compare   -8      -.7E+1  -> -1
       
   255 ddcom430 compare   -8      -70E-1  -> -1
       
   256 
       
   257 ddcom440 compare   -8.0    -9.0    -> 1
       
   258 ddcom441 compare   -8.0    -9      -> 1
       
   259 ddcom442 compare   -8      -9.0    -> 1
       
   260 ddcom443 compare   -8E+0   -9.0    -> 1
       
   261 ddcom444 compare   -80E-1  -9.0    -> 1
       
   262 ddcom445 compare   -.8E+1  -9      -> 1
       
   263 ddcom446 compare   -80E-1  -9      -> 1
       
   264 ddcom447 compare   -8.0    -9E+0   -> 1
       
   265 ddcom448 compare   -8.0    -90E-1  -> 1
       
   266 ddcom449 compare   -8      -.9E+1  -> 1
       
   267 ddcom450 compare   -8      -90E-1  -> 1
       
   268 
       
   269 -- misalignment traps for little-endian
       
   270 ddcom451 compare      1.0       0.1  -> 1
       
   271 ddcom452 compare      0.1       1.0  -> -1
       
   272 ddcom453 compare     10.0       0.1  -> 1
       
   273 ddcom454 compare      0.1      10.0  -> -1
       
   274 ddcom455 compare      100       1.0  -> 1
       
   275 ddcom456 compare      1.0       100  -> -1
       
   276 ddcom457 compare     1000      10.0  -> 1
       
   277 ddcom458 compare     10.0      1000  -> -1
       
   278 ddcom459 compare    10000     100.0  -> 1
       
   279 ddcom460 compare    100.0     10000  -> -1
       
   280 ddcom461 compare   100000    1000.0  -> 1
       
   281 ddcom462 compare   1000.0    100000  -> -1
       
   282 ddcom463 compare  1000000   10000.0  -> 1
       
   283 ddcom464 compare  10000.0   1000000  -> -1
       
   284 
       
   285 -- testcases that subtract to lots of zeros at boundaries [pgr]
       
   286 ddcom473 compare 123.4560000000000E-89 123.456E-89 -> 0
       
   287 ddcom474 compare 123.456000000000E+89 123.456E+89 -> 0
       
   288 ddcom475 compare 123.45600000000E-89 123.456E-89 -> 0
       
   289 ddcom476 compare 123.4560000000E+89 123.456E+89 -> 0
       
   290 ddcom477 compare 123.456000000E-89 123.456E-89 -> 0
       
   291 ddcom478 compare 123.45600000E+89 123.456E+89 -> 0
       
   292 ddcom479 compare 123.4560000E-89 123.456E-89 -> 0
       
   293 ddcom480 compare 123.456000E+89 123.456E+89 -> 0
       
   294 ddcom481 compare 123.45600E-89 123.456E-89 -> 0
       
   295 ddcom482 compare 123.4560E+89 123.456E+89 -> 0
       
   296 ddcom483 compare 123.456E-89 123.456E-89 -> 0
       
   297 ddcom487 compare 123.456E+89 123.4560000000000E+89 -> 0
       
   298 ddcom488 compare 123.456E-89 123.456000000000E-89 -> 0
       
   299 ddcom489 compare 123.456E+89 123.45600000000E+89 -> 0
       
   300 ddcom490 compare 123.456E-89 123.4560000000E-89 -> 0
       
   301 ddcom491 compare 123.456E+89 123.456000000E+89 -> 0
       
   302 ddcom492 compare 123.456E-89 123.45600000E-89 -> 0
       
   303 ddcom493 compare 123.456E+89 123.4560000E+89 -> 0
       
   304 ddcom494 compare 123.456E-89 123.456000E-89 -> 0
       
   305 ddcom495 compare 123.456E+89 123.45600E+89 -> 0
       
   306 ddcom496 compare 123.456E-89 123.4560E-89 -> 0
       
   307 ddcom497 compare 123.456E+89 123.456E+89 -> 0
       
   308 
       
   309 -- wide-ranging, around precision; signs equal
       
   310 ddcom500 compare    1     1E-15    -> 1
       
   311 ddcom501 compare    1     1E-14    -> 1
       
   312 ddcom502 compare    1     1E-13    -> 1
       
   313 ddcom503 compare    1     1E-12    -> 1
       
   314 ddcom504 compare    1     1E-11    -> 1
       
   315 ddcom505 compare    1     1E-10    -> 1
       
   316 ddcom506 compare    1     1E-9     -> 1
       
   317 ddcom507 compare    1     1E-8     -> 1
       
   318 ddcom508 compare    1     1E-7     -> 1
       
   319 ddcom509 compare    1     1E-6     -> 1
       
   320 ddcom510 compare    1     1E-5     -> 1
       
   321 ddcom511 compare    1     1E-4     -> 1
       
   322 ddcom512 compare    1     1E-3     -> 1
       
   323 ddcom513 compare    1     1E-2     -> 1
       
   324 ddcom514 compare    1     1E-1     -> 1
       
   325 ddcom515 compare    1     1E-0     -> 0
       
   326 ddcom516 compare    1     1E+1     -> -1
       
   327 ddcom517 compare    1     1E+2     -> -1
       
   328 ddcom518 compare    1     1E+3     -> -1
       
   329 ddcom519 compare    1     1E+4     -> -1
       
   330 ddcom521 compare    1     1E+5     -> -1
       
   331 ddcom522 compare    1     1E+6     -> -1
       
   332 ddcom523 compare    1     1E+7     -> -1
       
   333 ddcom524 compare    1     1E+8     -> -1
       
   334 ddcom525 compare    1     1E+9     -> -1
       
   335 ddcom526 compare    1     1E+10    -> -1
       
   336 ddcom527 compare    1     1E+11    -> -1
       
   337 ddcom528 compare    1     1E+12    -> -1
       
   338 ddcom529 compare    1     1E+13    -> -1
       
   339 ddcom530 compare    1     1E+14    -> -1
       
   340 ddcom531 compare    1     1E+15    -> -1
       
   341 -- LR swap
       
   342 ddcom540 compare    1E-15  1       -> -1
       
   343 ddcom541 compare    1E-14  1       -> -1
       
   344 ddcom542 compare    1E-13  1       -> -1
       
   345 ddcom543 compare    1E-12  1       -> -1
       
   346 ddcom544 compare    1E-11  1       -> -1
       
   347 ddcom545 compare    1E-10  1       -> -1
       
   348 ddcom546 compare    1E-9   1       -> -1
       
   349 ddcom547 compare    1E-8   1       -> -1
       
   350 ddcom548 compare    1E-7   1       -> -1
       
   351 ddcom549 compare    1E-6   1       -> -1
       
   352 ddcom550 compare    1E-5   1       -> -1
       
   353 ddcom551 compare    1E-4   1       -> -1
       
   354 ddcom552 compare    1E-3   1       -> -1
       
   355 ddcom553 compare    1E-2   1       -> -1
       
   356 ddcom554 compare    1E-1   1       -> -1
       
   357 ddcom555 compare    1E-0   1       ->  0
       
   358 ddcom556 compare    1E+1   1       ->  1
       
   359 ddcom557 compare    1E+2   1       ->  1
       
   360 ddcom558 compare    1E+3   1       ->  1
       
   361 ddcom559 compare    1E+4   1       ->  1
       
   362 ddcom561 compare    1E+5   1       ->  1
       
   363 ddcom562 compare    1E+6   1       ->  1
       
   364 ddcom563 compare    1E+7   1       ->  1
       
   365 ddcom564 compare    1E+8   1       ->  1
       
   366 ddcom565 compare    1E+9   1       ->  1
       
   367 ddcom566 compare    1E+10  1       ->  1
       
   368 ddcom567 compare    1E+11  1       ->  1
       
   369 ddcom568 compare    1E+12  1       ->  1
       
   370 ddcom569 compare    1E+13  1       ->  1
       
   371 ddcom570 compare    1E+14  1       ->  1
       
   372 ddcom571 compare    1E+15  1       ->  1
       
   373 -- similar with a useful coefficient, one side only
       
   374 ddcom580 compare  0.000000987654321     1E-15    -> 1
       
   375 ddcom581 compare  0.000000987654321     1E-14    -> 1
       
   376 ddcom582 compare  0.000000987654321     1E-13    -> 1
       
   377 ddcom583 compare  0.000000987654321     1E-12    -> 1
       
   378 ddcom584 compare  0.000000987654321     1E-11    -> 1
       
   379 ddcom585 compare  0.000000987654321     1E-10    -> 1
       
   380 ddcom586 compare  0.000000987654321     1E-9     -> 1
       
   381 ddcom587 compare  0.000000987654321     1E-8     -> 1
       
   382 ddcom588 compare  0.000000987654321     1E-7     -> 1
       
   383 ddcom589 compare  0.000000987654321     1E-6     -> -1
       
   384 ddcom590 compare  0.000000987654321     1E-5     -> -1
       
   385 ddcom591 compare  0.000000987654321     1E-4     -> -1
       
   386 ddcom592 compare  0.000000987654321     1E-3     -> -1
       
   387 ddcom593 compare  0.000000987654321     1E-2     -> -1
       
   388 ddcom594 compare  0.000000987654321     1E-1     -> -1
       
   389 ddcom595 compare  0.000000987654321     1E-0     -> -1
       
   390 ddcom596 compare  0.000000987654321     1E+1     -> -1
       
   391 ddcom597 compare  0.000000987654321     1E+2     -> -1
       
   392 ddcom598 compare  0.000000987654321     1E+3     -> -1
       
   393 ddcom599 compare  0.000000987654321     1E+4     -> -1
       
   394 
       
   395 -- check some unit-y traps
       
   396 ddcom600 compare   12            12.2345 -> -1
       
   397 ddcom601 compare   12.0          12.2345 -> -1
       
   398 ddcom602 compare   12.00         12.2345 -> -1
       
   399 ddcom603 compare   12.000        12.2345 -> -1
       
   400 ddcom604 compare   12.0000       12.2345 -> -1
       
   401 ddcom605 compare   12.00000      12.2345 -> -1
       
   402 ddcom606 compare   12.000000     12.2345 -> -1
       
   403 ddcom607 compare   12.0000000    12.2345 -> -1
       
   404 ddcom608 compare   12.00000000   12.2345 -> -1
       
   405 ddcom609 compare   12.000000000  12.2345 -> -1
       
   406 ddcom610 compare   12.1234 12            ->  1
       
   407 ddcom611 compare   12.1234 12.0          ->  1
       
   408 ddcom612 compare   12.1234 12.00         ->  1
       
   409 ddcom613 compare   12.1234 12.000        ->  1
       
   410 ddcom614 compare   12.1234 12.0000       ->  1
       
   411 ddcom615 compare   12.1234 12.00000      ->  1
       
   412 ddcom616 compare   12.1234 12.000000     ->  1
       
   413 ddcom617 compare   12.1234 12.0000000    ->  1
       
   414 ddcom618 compare   12.1234 12.00000000   ->  1
       
   415 ddcom619 compare   12.1234 12.000000000  ->  1
       
   416 ddcom620 compare  -12           -12.2345 ->  1
       
   417 ddcom621 compare  -12.0         -12.2345 ->  1
       
   418 ddcom622 compare  -12.00        -12.2345 ->  1
       
   419 ddcom623 compare  -12.000       -12.2345 ->  1
       
   420 ddcom624 compare  -12.0000      -12.2345 ->  1
       
   421 ddcom625 compare  -12.00000     -12.2345 ->  1
       
   422 ddcom626 compare  -12.000000    -12.2345 ->  1
       
   423 ddcom627 compare  -12.0000000   -12.2345 ->  1
       
   424 ddcom628 compare  -12.00000000  -12.2345 ->  1
       
   425 ddcom629 compare  -12.000000000 -12.2345 ->  1
       
   426 ddcom630 compare  -12.1234 -12           -> -1
       
   427 ddcom631 compare  -12.1234 -12.0         -> -1
       
   428 ddcom632 compare  -12.1234 -12.00        -> -1
       
   429 ddcom633 compare  -12.1234 -12.000       -> -1
       
   430 ddcom634 compare  -12.1234 -12.0000      -> -1
       
   431 ddcom635 compare  -12.1234 -12.00000     -> -1
       
   432 ddcom636 compare  -12.1234 -12.000000    -> -1
       
   433 ddcom637 compare  -12.1234 -12.0000000   -> -1
       
   434 ddcom638 compare  -12.1234 -12.00000000  -> -1
       
   435 ddcom639 compare  -12.1234 -12.000000000 -> -1
       
   436 
       
   437 -- extended zeros
       
   438 ddcom640 compare   0     0   -> 0
       
   439 ddcom641 compare   0    -0   -> 0
       
   440 ddcom642 compare   0    -0.0 -> 0
       
   441 ddcom643 compare   0     0.0 -> 0
       
   442 ddcom644 compare  -0     0   -> 0
       
   443 ddcom645 compare  -0    -0   -> 0
       
   444 ddcom646 compare  -0    -0.0 -> 0
       
   445 ddcom647 compare  -0     0.0 -> 0
       
   446 ddcom648 compare   0.0   0   -> 0
       
   447 ddcom649 compare   0.0  -0   -> 0
       
   448 ddcom650 compare   0.0  -0.0 -> 0
       
   449 ddcom651 compare   0.0   0.0 -> 0
       
   450 ddcom652 compare  -0.0   0   -> 0
       
   451 ddcom653 compare  -0.0  -0   -> 0
       
   452 ddcom654 compare  -0.0  -0.0 -> 0
       
   453 ddcom655 compare  -0.0   0.0 -> 0
       
   454 
       
   455 ddcom656 compare  -0E1   0.0 -> 0
       
   456 ddcom657 compare  -0E2   0.0 -> 0
       
   457 ddcom658 compare   0E1   0.0 -> 0
       
   458 ddcom659 compare   0E2   0.0 -> 0
       
   459 ddcom660 compare  -0E1   0   -> 0
       
   460 ddcom661 compare  -0E2   0   -> 0
       
   461 ddcom662 compare   0E1   0   -> 0
       
   462 ddcom663 compare   0E2   0   -> 0
       
   463 ddcom664 compare  -0E1  -0E1 -> 0
       
   464 ddcom665 compare  -0E2  -0E1 -> 0
       
   465 ddcom666 compare   0E1  -0E1 -> 0
       
   466 ddcom667 compare   0E2  -0E1 -> 0
       
   467 ddcom668 compare  -0E1  -0E2 -> 0
       
   468 ddcom669 compare  -0E2  -0E2 -> 0
       
   469 ddcom670 compare   0E1  -0E2 -> 0
       
   470 ddcom671 compare   0E2  -0E2 -> 0
       
   471 ddcom672 compare  -0E1   0E1 -> 0
       
   472 ddcom673 compare  -0E2   0E1 -> 0
       
   473 ddcom674 compare   0E1   0E1 -> 0
       
   474 ddcom675 compare   0E2   0E1 -> 0
       
   475 ddcom676 compare  -0E1   0E2 -> 0
       
   476 ddcom677 compare  -0E2   0E2 -> 0
       
   477 ddcom678 compare   0E1   0E2 -> 0
       
   478 ddcom679 compare   0E2   0E2 -> 0
       
   479 
       
   480 -- trailing zeros; unit-y
       
   481 ddcom680 compare   12    12           -> 0
       
   482 ddcom681 compare   12    12.0         -> 0
       
   483 ddcom682 compare   12    12.00        -> 0
       
   484 ddcom683 compare   12    12.000       -> 0
       
   485 ddcom684 compare   12    12.0000      -> 0
       
   486 ddcom685 compare   12    12.00000     -> 0
       
   487 ddcom686 compare   12    12.000000    -> 0
       
   488 ddcom687 compare   12    12.0000000   -> 0
       
   489 ddcom688 compare   12    12.00000000  -> 0
       
   490 ddcom689 compare   12    12.000000000 -> 0
       
   491 ddcom690 compare   12              12 -> 0
       
   492 ddcom691 compare   12.0            12 -> 0
       
   493 ddcom692 compare   12.00           12 -> 0
       
   494 ddcom693 compare   12.000          12 -> 0
       
   495 ddcom694 compare   12.0000         12 -> 0
       
   496 ddcom695 compare   12.00000        12 -> 0
       
   497 ddcom696 compare   12.000000       12 -> 0
       
   498 ddcom697 compare   12.0000000      12 -> 0
       
   499 ddcom698 compare   12.00000000     12 -> 0
       
   500 ddcom699 compare   12.000000000    12 -> 0
       
   501 
       
   502 -- first, second, & last digit
       
   503 ddcom700 compare   1234567890123456 1234567890123455 -> 1
       
   504 ddcom701 compare   1234567890123456 1234567890123456 -> 0
       
   505 ddcom702 compare   1234567890123456 1234567890123457 -> -1
       
   506 ddcom703 compare   1234567890123456 0234567890123456 -> 1
       
   507 ddcom704 compare   1234567890123456 1234567890123456 -> 0
       
   508 ddcom705 compare   1234567890123456 2234567890123456 -> -1
       
   509 ddcom706 compare   1134567890123456 1034567890123456 -> 1
       
   510 ddcom707 compare   1134567890123456 1134567890123456 -> 0
       
   511 ddcom708 compare   1134567890123456 1234567890123456 -> -1
       
   512 
       
   513 -- miscellaneous
       
   514 ddcom721 compare 12345678000 1 -> 1
       
   515 ddcom722 compare 1 12345678000 -> -1
       
   516 ddcom723 compare 1234567800  1 -> 1
       
   517 ddcom724 compare 1 1234567800  -> -1
       
   518 ddcom725 compare 1234567890  1 -> 1
       
   519 ddcom726 compare 1 1234567890  -> -1
       
   520 ddcom727 compare 1234567891  1 -> 1
       
   521 ddcom728 compare 1 1234567891  -> -1
       
   522 ddcom729 compare 12345678901 1 -> 1
       
   523 ddcom730 compare 1 12345678901 -> -1
       
   524 ddcom731 compare 1234567896  1 -> 1
       
   525 ddcom732 compare 1 1234567896  -> -1
       
   526 
       
   527 -- residue cases at lower precision
       
   528 ddcom740 compare  1  0.9999999  -> 1
       
   529 ddcom741 compare  1  0.999999   -> 1
       
   530 ddcom742 compare  1  0.99999    -> 1
       
   531 ddcom743 compare  1  1.0000     -> 0
       
   532 ddcom744 compare  1  1.00001    -> -1
       
   533 ddcom745 compare  1  1.000001   -> -1
       
   534 ddcom746 compare  1  1.0000001  -> -1
       
   535 ddcom750 compare  0.9999999  1  -> -1
       
   536 ddcom751 compare  0.999999   1  -> -1
       
   537 ddcom752 compare  0.99999    1  -> -1
       
   538 ddcom753 compare  1.0000     1  -> 0
       
   539 ddcom754 compare  1.00001    1  -> 1
       
   540 ddcom755 compare  1.000001   1  -> 1
       
   541 ddcom756 compare  1.0000001  1  -> 1
       
   542 
       
   543 -- Specials
       
   544 ddcom780 compare  Inf  -Inf   ->  1
       
   545 ddcom781 compare  Inf  -1000  ->  1
       
   546 ddcom782 compare  Inf  -1     ->  1
       
   547 ddcom783 compare  Inf  -0     ->  1
       
   548 ddcom784 compare  Inf   0     ->  1
       
   549 ddcom785 compare  Inf   1     ->  1
       
   550 ddcom786 compare  Inf   1000  ->  1
       
   551 ddcom787 compare  Inf   Inf   ->  0
       
   552 ddcom788 compare -1000  Inf   -> -1
       
   553 ddcom789 compare -Inf   Inf   -> -1
       
   554 ddcom790 compare -1     Inf   -> -1
       
   555 ddcom791 compare -0     Inf   -> -1
       
   556 ddcom792 compare  0     Inf   -> -1
       
   557 ddcom793 compare  1     Inf   -> -1
       
   558 ddcom794 compare  1000  Inf   -> -1
       
   559 ddcom795 compare  Inf   Inf   ->  0
       
   560 
       
   561 ddcom800 compare -Inf  -Inf   ->  0
       
   562 ddcom801 compare -Inf  -1000  -> -1
       
   563 ddcom802 compare -Inf  -1     -> -1
       
   564 ddcom803 compare -Inf  -0     -> -1
       
   565 ddcom804 compare -Inf   0     -> -1
       
   566 ddcom805 compare -Inf   1     -> -1
       
   567 ddcom806 compare -Inf   1000  -> -1
       
   568 ddcom807 compare -Inf   Inf   -> -1
       
   569 ddcom808 compare -Inf  -Inf   ->  0
       
   570 ddcom809 compare -1000 -Inf   ->  1
       
   571 ddcom810 compare -1    -Inf   ->  1
       
   572 ddcom811 compare -0    -Inf   ->  1
       
   573 ddcom812 compare  0    -Inf   ->  1
       
   574 ddcom813 compare  1    -Inf   ->  1
       
   575 ddcom814 compare  1000 -Inf   ->  1
       
   576 ddcom815 compare  Inf  -Inf   ->  1
       
   577 
       
   578 ddcom821 compare  NaN -Inf    ->  NaN
       
   579 ddcom822 compare  NaN -1000   ->  NaN
       
   580 ddcom823 compare  NaN -1      ->  NaN
       
   581 ddcom824 compare  NaN -0      ->  NaN
       
   582 ddcom825 compare  NaN  0      ->  NaN
       
   583 ddcom826 compare  NaN  1      ->  NaN
       
   584 ddcom827 compare  NaN  1000   ->  NaN
       
   585 ddcom828 compare  NaN  Inf    ->  NaN
       
   586 ddcom829 compare  NaN  NaN    ->  NaN
       
   587 ddcom830 compare -Inf  NaN    ->  NaN
       
   588 ddcom831 compare -1000 NaN    ->  NaN
       
   589 ddcom832 compare -1    NaN    ->  NaN
       
   590 ddcom833 compare -0    NaN    ->  NaN
       
   591 ddcom834 compare  0    NaN    ->  NaN
       
   592 ddcom835 compare  1    NaN    ->  NaN
       
   593 ddcom836 compare  1000 NaN    ->  NaN
       
   594 ddcom837 compare  Inf  NaN    ->  NaN
       
   595 ddcom838 compare -NaN -NaN    -> -NaN
       
   596 ddcom839 compare +NaN -NaN    ->  NaN
       
   597 ddcom840 compare -NaN +NaN    -> -NaN
       
   598 
       
   599 ddcom841 compare  sNaN -Inf   ->  NaN  Invalid_operation
       
   600 ddcom842 compare  sNaN -1000  ->  NaN  Invalid_operation
       
   601 ddcom843 compare  sNaN -1     ->  NaN  Invalid_operation
       
   602 ddcom844 compare  sNaN -0     ->  NaN  Invalid_operation
       
   603 ddcom845 compare  sNaN  0     ->  NaN  Invalid_operation
       
   604 ddcom846 compare  sNaN  1     ->  NaN  Invalid_operation
       
   605 ddcom847 compare  sNaN  1000  ->  NaN  Invalid_operation
       
   606 ddcom848 compare  sNaN  NaN   ->  NaN  Invalid_operation
       
   607 ddcom849 compare  sNaN sNaN   ->  NaN  Invalid_operation
       
   608 ddcom850 compare  NaN  sNaN   ->  NaN  Invalid_operation
       
   609 ddcom851 compare -Inf  sNaN   ->  NaN  Invalid_operation
       
   610 ddcom852 compare -1000 sNaN   ->  NaN  Invalid_operation
       
   611 ddcom853 compare -1    sNaN   ->  NaN  Invalid_operation
       
   612 ddcom854 compare -0    sNaN   ->  NaN  Invalid_operation
       
   613 ddcom855 compare  0    sNaN   ->  NaN  Invalid_operation
       
   614 ddcom856 compare  1    sNaN   ->  NaN  Invalid_operation
       
   615 ddcom857 compare  1000 sNaN   ->  NaN  Invalid_operation
       
   616 ddcom858 compare  Inf  sNaN   ->  NaN  Invalid_operation
       
   617 ddcom859 compare  NaN  sNaN   ->  NaN  Invalid_operation
       
   618 
       
   619 -- propagating NaNs
       
   620 ddcom860 compare  NaN9 -Inf   ->  NaN9
       
   621 ddcom861 compare  NaN8  999   ->  NaN8
       
   622 ddcom862 compare  NaN77 Inf   ->  NaN77
       
   623 ddcom863 compare -NaN67 NaN5  -> -NaN67
       
   624 ddcom864 compare -Inf  -NaN4  -> -NaN4
       
   625 ddcom865 compare -999  -NaN33 -> -NaN33
       
   626 ddcom866 compare  Inf   NaN2  ->  NaN2
       
   627 ddcom867 compare -NaN41 -NaN42 -> -NaN41
       
   628 ddcom868 compare +NaN41 -NaN42 ->  NaN41
       
   629 ddcom869 compare -NaN41 +NaN42 -> -NaN41
       
   630 ddcom870 compare +NaN41 +NaN42 ->  NaN41
       
   631 
       
   632 ddcom871 compare -sNaN99 -Inf    -> -NaN99 Invalid_operation
       
   633 ddcom872 compare  sNaN98 -11     ->  NaN98 Invalid_operation
       
   634 ddcom873 compare  sNaN97  NaN    ->  NaN97 Invalid_operation
       
   635 ddcom874 compare  sNaN16 sNaN94  ->  NaN16 Invalid_operation
       
   636 ddcom875 compare  NaN85  sNaN83  ->  NaN83 Invalid_operation
       
   637 ddcom876 compare -Inf    sNaN92  ->  NaN92 Invalid_operation
       
   638 ddcom877 compare  088    sNaN81  ->  NaN81 Invalid_operation
       
   639 ddcom878 compare  Inf    sNaN90  ->  NaN90 Invalid_operation
       
   640 ddcom879 compare  NaN   -sNaN89  -> -NaN89 Invalid_operation
       
   641 
       
   642 -- wide range
       
   643 ddcom880 compare +1.23456789012345E-0 9E+384 -> -1
       
   644 ddcom881 compare 9E+384 +1.23456789012345E-0 ->  1
       
   645 ddcom882 compare +0.100 9E-383               ->  1
       
   646 ddcom883 compare 9E-383 +0.100               -> -1
       
   647 ddcom885 compare -1.23456789012345E-0 9E+384 -> -1
       
   648 ddcom886 compare 9E+384 -1.23456789012345E-0 ->  1
       
   649 ddcom887 compare -0.100 9E-383               -> -1
       
   650 ddcom888 compare 9E-383 -0.100               ->  1
       
   651 
       
   652 -- spread zeros
       
   653 ddcom900 compare   0E-383  0       ->  0
       
   654 ddcom901 compare   0E-383 -0       ->  0
       
   655 ddcom902 compare  -0E-383  0       ->  0
       
   656 ddcom903 compare  -0E-383 -0       ->  0
       
   657 ddcom904 compare   0E-383  0E+384  ->  0
       
   658 ddcom905 compare   0E-383 -0E+384  ->  0
       
   659 ddcom906 compare  -0E-383  0E+384  ->  0
       
   660 ddcom907 compare  -0E-383 -0E+384  ->  0
       
   661 ddcom908 compare   0       0E+384  ->  0
       
   662 ddcom909 compare   0      -0E+384  ->  0
       
   663 ddcom910 compare  -0       0E+384  ->  0
       
   664 ddcom911 compare  -0      -0E+384  ->  0
       
   665 ddcom930 compare   0E+384  0       ->  0
       
   666 ddcom931 compare   0E+384 -0       ->  0
       
   667 ddcom932 compare  -0E+384  0       ->  0
       
   668 ddcom933 compare  -0E+384 -0       ->  0
       
   669 ddcom934 compare   0E+384  0E-383  ->  0
       
   670 ddcom935 compare   0E+384 -0E-383  ->  0
       
   671 ddcom936 compare  -0E+384  0E-383  ->  0
       
   672 ddcom937 compare  -0E+384 -0E-383  ->  0
       
   673 ddcom938 compare   0       0E-383  ->  0
       
   674 ddcom939 compare   0      -0E-383  ->  0
       
   675 ddcom940 compare  -0       0E-383  ->  0
       
   676 ddcom941 compare  -0      -0E-383  ->  0
       
   677 
       
   678 -- signs
       
   679 ddcom961 compare  1e+77  1e+11 ->  1
       
   680 ddcom962 compare  1e+77 -1e+11 ->  1
       
   681 ddcom963 compare -1e+77  1e+11 -> -1
       
   682 ddcom964 compare -1e+77 -1e+11 -> -1
       
   683 ddcom965 compare  1e-77  1e-11 -> -1
       
   684 ddcom966 compare  1e-77 -1e-11 ->  1
       
   685 ddcom967 compare -1e-77  1e-11 -> -1
       
   686 ddcom968 compare -1e-77 -1e-11 ->  1
       
   687 
       
   688 -- full alignment range, both ways
       
   689 ddcomp1001 compare 1 1.000000000000000  -> 0
       
   690 ddcomp1002 compare 1 1.00000000000000   -> 0
       
   691 ddcomp1003 compare 1 1.0000000000000    -> 0
       
   692 ddcomp1004 compare 1 1.000000000000     -> 0
       
   693 ddcomp1005 compare 1 1.00000000000      -> 0
       
   694 ddcomp1006 compare 1 1.0000000000       -> 0
       
   695 ddcomp1007 compare 1 1.000000000        -> 0
       
   696 ddcomp1008 compare 1 1.00000000         -> 0
       
   697 ddcomp1009 compare 1 1.0000000          -> 0
       
   698 ddcomp1010 compare 1 1.000000           -> 0
       
   699 ddcomp1011 compare 1 1.00000            -> 0
       
   700 ddcomp1012 compare 1 1.0000             -> 0
       
   701 ddcomp1013 compare 1 1.000              -> 0
       
   702 ddcomp1014 compare 1 1.00               -> 0
       
   703 ddcomp1015 compare 1 1.0                -> 0
       
   704 ddcomp1021 compare 1.000000000000000  1 -> 0
       
   705 ddcomp1022 compare 1.00000000000000   1 -> 0
       
   706 ddcomp1023 compare 1.0000000000000    1 -> 0
       
   707 ddcomp1024 compare 1.000000000000     1 -> 0
       
   708 ddcomp1025 compare 1.00000000000      1 -> 0
       
   709 ddcomp1026 compare 1.0000000000       1 -> 0
       
   710 ddcomp1027 compare 1.000000000        1 -> 0
       
   711 ddcomp1028 compare 1.00000000         1 -> 0
       
   712 ddcomp1029 compare 1.0000000          1 -> 0
       
   713 ddcomp1030 compare 1.000000           1 -> 0
       
   714 ddcomp1031 compare 1.00000            1 -> 0
       
   715 ddcomp1032 compare 1.0000             1 -> 0
       
   716 ddcomp1033 compare 1.000              1 -> 0
       
   717 ddcomp1034 compare 1.00               1 -> 0
       
   718 ddcomp1035 compare 1.0                1 -> 0
       
   719 
       
   720 -- check MSD always detected non-zero
       
   721 ddcomp1040 compare 0 0.000000000000000  -> 0
       
   722 ddcomp1041 compare 0 1.000000000000000  -> -1
       
   723 ddcomp1042 compare 0 2.000000000000000  -> -1
       
   724 ddcomp1043 compare 0 3.000000000000000  -> -1
       
   725 ddcomp1044 compare 0 4.000000000000000  -> -1
       
   726 ddcomp1045 compare 0 5.000000000000000  -> -1
       
   727 ddcomp1046 compare 0 6.000000000000000  -> -1
       
   728 ddcomp1047 compare 0 7.000000000000000  -> -1
       
   729 ddcomp1048 compare 0 8.000000000000000  -> -1
       
   730 ddcomp1049 compare 0 9.000000000000000  -> -1
       
   731 ddcomp1050 compare 0.000000000000000  0 -> 0
       
   732 ddcomp1051 compare 1.000000000000000  0 -> 1
       
   733 ddcomp1052 compare 2.000000000000000  0 -> 1
       
   734 ddcomp1053 compare 3.000000000000000  0 -> 1
       
   735 ddcomp1054 compare 4.000000000000000  0 -> 1
       
   736 ddcomp1055 compare 5.000000000000000  0 -> 1
       
   737 ddcomp1056 compare 6.000000000000000  0 -> 1
       
   738 ddcomp1057 compare 7.000000000000000  0 -> 1
       
   739 ddcomp1058 compare 8.000000000000000  0 -> 1
       
   740 ddcomp1059 compare 9.000000000000000  0 -> 1
       
   741 
       
   742 -- Null tests
       
   743 ddcom9990 compare 10  # -> NaN Invalid_operation
       
   744 ddcom9991 compare  # 10 -> NaN Invalid_operation