Home | History | Annotate | Download | only in decimaltestdata
      1 ------------------------------------------------------------------------
      2 -- dqSubtract.decTest -- decQuad subtraction                          --
      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 -- This set of tests are for decQuads only; all arguments are
     23 -- representable in a decQuad
     24 extended:    1
     25 clamp:       1
     26 precision:   34
     27 maxExponent: 6144
     28 minExponent: -6143
     29 rounding:    half_even
     30 
     31 -- [first group are 'quick confidence check']
     32 dqsub001 subtract  0   0  -> '0'
     33 dqsub002 subtract  1   1  -> '0'
     34 dqsub003 subtract  1   2  -> '-1'
     35 dqsub004 subtract  2   1  -> '1'
     36 dqsub005 subtract  2   2  -> '0'
     37 dqsub006 subtract  3   2  -> '1'
     38 dqsub007 subtract  2   3  -> '-1'
     39 
     40 dqsub011 subtract -0   0  -> '-0'
     41 dqsub012 subtract -1   1  -> '-2'
     42 dqsub013 subtract -1   2  -> '-3'
     43 dqsub014 subtract -2   1  -> '-3'
     44 dqsub015 subtract -2   2  -> '-4'
     45 dqsub016 subtract -3   2  -> '-5'
     46 dqsub017 subtract -2   3  -> '-5'
     47 
     48 dqsub021 subtract  0  -0  -> '0'
     49 dqsub022 subtract  1  -1  -> '2'
     50 dqsub023 subtract  1  -2  -> '3'
     51 dqsub024 subtract  2  -1  -> '3'
     52 dqsub025 subtract  2  -2  -> '4'
     53 dqsub026 subtract  3  -2  -> '5'
     54 dqsub027 subtract  2  -3  -> '5'
     55 
     56 dqsub030 subtract  11  1  -> 10
     57 dqsub031 subtract  10  1  ->  9
     58 dqsub032 subtract  9   1  ->  8
     59 dqsub033 subtract  1   1  ->  0
     60 dqsub034 subtract  0   1  -> -1
     61 dqsub035 subtract -1   1  -> -2
     62 dqsub036 subtract -9   1  -> -10
     63 dqsub037 subtract -10  1  -> -11
     64 dqsub038 subtract -11  1  -> -12
     65 
     66 dqsub040 subtract '5.75' '3.3'  -> '2.45'
     67 dqsub041 subtract '5'    '-3'   -> '8'
     68 dqsub042 subtract '-5'   '-3'   -> '-2'
     69 dqsub043 subtract '-7'   '2.5'  -> '-9.5'
     70 dqsub044 subtract '0.7'  '0.3'  -> '0.4'
     71 dqsub045 subtract '1.3'  '0.3'  -> '1.0'
     72 dqsub046 subtract '1.25' '1.25' -> '0.00'
     73 
     74 dqsub050 subtract '1.23456789'    '1.00000000' -> '0.23456789'
     75 dqsub051 subtract '1.23456789'    '1.00000089' -> '0.23456700'
     76 
     77 dqsub060 subtract '70'    '10000e+34' -> '-1.000000000000000000000000000000000E+38' Inexact Rounded
     78 dqsub061 subtract '700'    '10000e+34' -> '-1.000000000000000000000000000000000E+38' Inexact Rounded
     79 dqsub062 subtract '7000'    '10000e+34' -> '-9.999999999999999999999999999999999E+37' Inexact Rounded
     80 dqsub063 subtract '70000'    '10000e+34' -> '-9.999999999999999999999999999999993E+37' Rounded
     81 dqsub064 subtract '700000'    '10000e+34' -> '-9.999999999999999999999999999999930E+37' Rounded
     82   -- symmetry:
     83 dqsub065 subtract '10000e+34'    '70' -> '1.000000000000000000000000000000000E+38' Inexact Rounded
     84 dqsub066 subtract '10000e+34'    '700' -> '1.000000000000000000000000000000000E+38' Inexact Rounded
     85 dqsub067 subtract '10000e+34'    '7000' -> '9.999999999999999999999999999999999E+37' Inexact Rounded
     86 dqsub068 subtract '10000e+34'    '70000' -> '9.999999999999999999999999999999993E+37' Rounded
     87 dqsub069 subtract '10000e+34'    '700000' -> '9.999999999999999999999999999999930E+37' Rounded
     88 
     89   -- some of the next group are really constructor tests
     90 dqsub090 subtract '00.0'    '0.0'  -> '0.0'
     91 dqsub091 subtract '00.0'    '0.00' -> '0.00'
     92 dqsub092 subtract '0.00'    '00.0' -> '0.00'
     93 dqsub093 subtract '00.0'    '0.00' -> '0.00'
     94 dqsub094 subtract '0.00'    '00.0' -> '0.00'
     95 dqsub095 subtract '3'    '.3'   -> '2.7'
     96 dqsub096 subtract '3.'   '.3'   -> '2.7'
     97 dqsub097 subtract '3.0'  '.3'   -> '2.7'
     98 dqsub098 subtract '3.00' '.3'   -> '2.70'
     99 dqsub099 subtract '3'    '3'    -> '0'
    100 dqsub100 subtract '3'    '+3'   -> '0'
    101 dqsub101 subtract '3'    '-3'   -> '6'
    102 dqsub102 subtract '3'    '0.3'  -> '2.7'
    103 dqsub103 subtract '3.'   '0.3'  -> '2.7'
    104 dqsub104 subtract '3.0'  '0.3'  -> '2.7'
    105 dqsub105 subtract '3.00' '0.3'  -> '2.70'
    106 dqsub106 subtract '3'    '3.0'  -> '0.0'
    107 dqsub107 subtract '3'    '+3.0' -> '0.0'
    108 dqsub108 subtract '3'    '-3.0' -> '6.0'
    109 
    110 -- the above all from add; massaged and extended.  Now some new ones...
    111 -- [particularly important for comparisons]
    112 -- NB: -xE-8 below were non-exponents pre-ANSI X3-274, and -1E-7 or 0E-7
    113 -- with input rounding.
    114 dqsub120 subtract  '10.23456784'    '10.23456789'  -> '-5E-8'
    115 dqsub121 subtract  '10.23456785'    '10.23456789'  -> '-4E-8'
    116 dqsub122 subtract  '10.23456786'    '10.23456789'  -> '-3E-8'
    117 dqsub123 subtract  '10.23456787'    '10.23456789'  -> '-2E-8'
    118 dqsub124 subtract  '10.23456788'    '10.23456789'  -> '-1E-8'
    119 dqsub125 subtract  '10.23456789'    '10.23456789'  -> '0E-8'
    120 dqsub126 subtract  '10.23456790'    '10.23456789'  -> '1E-8'
    121 dqsub127 subtract  '10.23456791'    '10.23456789'  -> '2E-8'
    122 dqsub128 subtract  '10.23456792'    '10.23456789'  -> '3E-8'
    123 dqsub129 subtract  '10.23456793'    '10.23456789'  -> '4E-8'
    124 dqsub130 subtract  '10.23456794'    '10.23456789'  -> '5E-8'
    125 dqsub131 subtract  '10.23456781'    '10.23456786'  -> '-5E-8'
    126 dqsub132 subtract  '10.23456782'    '10.23456786'  -> '-4E-8'
    127 dqsub133 subtract  '10.23456783'    '10.23456786'  -> '-3E-8'
    128 dqsub134 subtract  '10.23456784'    '10.23456786'  -> '-2E-8'
    129 dqsub135 subtract  '10.23456785'    '10.23456786'  -> '-1E-8'
    130 dqsub136 subtract  '10.23456786'    '10.23456786'  -> '0E-8'
    131 dqsub137 subtract  '10.23456787'    '10.23456786'  -> '1E-8'
    132 dqsub138 subtract  '10.23456788'    '10.23456786'  -> '2E-8'
    133 dqsub139 subtract  '10.23456789'    '10.23456786'  -> '3E-8'
    134 dqsub140 subtract  '10.23456790'    '10.23456786'  -> '4E-8'
    135 dqsub141 subtract  '10.23456791'    '10.23456786'  -> '5E-8'
    136 dqsub142 subtract  '1'              '0.999999999'  -> '1E-9'
    137 dqsub143 subtract  '0.999999999'    '1'            -> '-1E-9'
    138 dqsub144 subtract  '-10.23456780'   '-10.23456786' -> '6E-8'
    139 dqsub145 subtract  '-10.23456790'   '-10.23456786' -> '-4E-8'
    140 dqsub146 subtract  '-10.23456791'   '-10.23456786' -> '-5E-8'
    141 
    142 -- additional scaled arithmetic tests [0.97 problem]
    143 dqsub160 subtract '0'     '.1'      -> '-0.1'
    144 dqsub161 subtract '00'    '.97983'  -> '-0.97983'
    145 dqsub162 subtract '0'     '.9'      -> '-0.9'
    146 dqsub163 subtract '0'     '0.102'   -> '-0.102'
    147 dqsub164 subtract '0'     '.4'      -> '-0.4'
    148 dqsub165 subtract '0'     '.307'    -> '-0.307'
    149 dqsub166 subtract '0'     '.43822'  -> '-0.43822'
    150 dqsub167 subtract '0'     '.911'    -> '-0.911'
    151 dqsub168 subtract '.0'    '.02'     -> '-0.02'
    152 dqsub169 subtract '00'    '.392'    -> '-0.392'
    153 dqsub170 subtract '0'     '.26'     -> '-0.26'
    154 dqsub171 subtract '0'     '0.51'    -> '-0.51'
    155 dqsub172 subtract '0'     '.2234'   -> '-0.2234'
    156 dqsub173 subtract '0'     '.2'      -> '-0.2'
    157 dqsub174 subtract '.0'    '.0008'   -> '-0.0008'
    158 -- 0. on left
    159 dqsub180 subtract '0.0'     '-.1'      -> '0.1'
    160 dqsub181 subtract '0.00'    '-.97983'  -> '0.97983'
    161 dqsub182 subtract '0.0'     '-.9'      -> '0.9'
    162 dqsub183 subtract '0.0'     '-0.102'   -> '0.102'
    163 dqsub184 subtract '0.0'     '-.4'      -> '0.4'
    164 dqsub185 subtract '0.0'     '-.307'    -> '0.307'
    165 dqsub186 subtract '0.0'     '-.43822'  -> '0.43822'
    166 dqsub187 subtract '0.0'     '-.911'    -> '0.911'
    167 dqsub188 subtract '0.0'     '-.02'     -> '0.02'
    168 dqsub189 subtract '0.00'    '-.392'    -> '0.392'
    169 dqsub190 subtract '0.0'     '-.26'     -> '0.26'
    170 dqsub191 subtract '0.0'     '-0.51'    -> '0.51'
    171 dqsub192 subtract '0.0'     '-.2234'   -> '0.2234'
    172 dqsub193 subtract '0.0'     '-.2'      -> '0.2'
    173 dqsub194 subtract '0.0'     '-.0008'   -> '0.0008'
    174 -- negatives of same
    175 dqsub200 subtract '0'     '-.1'      -> '0.1'
    176 dqsub201 subtract '00'    '-.97983'  -> '0.97983'
    177 dqsub202 subtract '0'     '-.9'      -> '0.9'
    178 dqsub203 subtract '0'     '-0.102'   -> '0.102'
    179 dqsub204 subtract '0'     '-.4'      -> '0.4'
    180 dqsub205 subtract '0'     '-.307'    -> '0.307'
    181 dqsub206 subtract '0'     '-.43822'  -> '0.43822'
    182 dqsub207 subtract '0'     '-.911'    -> '0.911'
    183 dqsub208 subtract '.0'    '-.02'     -> '0.02'
    184 dqsub209 subtract '00'    '-.392'    -> '0.392'
    185 dqsub210 subtract '0'     '-.26'     -> '0.26'
    186 dqsub211 subtract '0'     '-0.51'    -> '0.51'
    187 dqsub212 subtract '0'     '-.2234'   -> '0.2234'
    188 dqsub213 subtract '0'     '-.2'      -> '0.2'
    189 dqsub214 subtract '.0'    '-.0008'   -> '0.0008'
    190 
    191 -- more fixed, LHS swaps [really the same as testcases under add]
    192 dqsub220 subtract '-56267E-12' 0  -> '-5.6267E-8'
    193 dqsub221 subtract '-56267E-11' 0  -> '-5.6267E-7'
    194 dqsub222 subtract '-56267E-10' 0  -> '-0.0000056267'
    195 dqsub223 subtract '-56267E-9'  0  -> '-0.000056267'
    196 dqsub224 subtract '-56267E-8'  0  -> '-0.00056267'
    197 dqsub225 subtract '-56267E-7'  0  -> '-0.0056267'
    198 dqsub226 subtract '-56267E-6'  0  -> '-0.056267'
    199 dqsub227 subtract '-56267E-5'  0  -> '-0.56267'
    200 dqsub228 subtract '-56267E-2'  0  -> '-562.67'
    201 dqsub229 subtract '-56267E-1'  0  -> '-5626.7'
    202 dqsub230 subtract '-56267E-0'  0  -> '-56267'
    203 -- symmetry ...
    204 dqsub240 subtract 0 '-56267E-12'  -> '5.6267E-8'
    205 dqsub241 subtract 0 '-56267E-11'  -> '5.6267E-7'
    206 dqsub242 subtract 0 '-56267E-10'  -> '0.0000056267'
    207 dqsub243 subtract 0 '-56267E-9'   -> '0.000056267'
    208 dqsub244 subtract 0 '-56267E-8'   -> '0.00056267'
    209 dqsub245 subtract 0 '-56267E-7'   -> '0.0056267'
    210 dqsub246 subtract 0 '-56267E-6'   -> '0.056267'
    211 dqsub247 subtract 0 '-56267E-5'   -> '0.56267'
    212 dqsub248 subtract 0 '-56267E-2'   -> '562.67'
    213 dqsub249 subtract 0 '-56267E-1'   -> '5626.7'
    214 dqsub250 subtract 0 '-56267E-0'   -> '56267'
    215 
    216 -- now some more from the 'new' add
    217 dqsub301 subtract '1.23456789'  '1.00000000' -> '0.23456789'
    218 dqsub302 subtract '1.23456789'  '1.00000011' -> '0.23456778'
    219 
    220 -- some carrying effects
    221 dqsub321 subtract '0.9998'  '0.0000' -> '0.9998'
    222 dqsub322 subtract '0.9998'  '0.0001' -> '0.9997'
    223 dqsub323 subtract '0.9998'  '0.0002' -> '0.9996'
    224 dqsub324 subtract '0.9998'  '0.0003' -> '0.9995'
    225 dqsub325 subtract '0.9998'  '-0.0000' -> '0.9998'
    226 dqsub326 subtract '0.9998'  '-0.0001' -> '0.9999'
    227 dqsub327 subtract '0.9998'  '-0.0002' -> '1.0000'
    228 dqsub328 subtract '0.9998'  '-0.0003' -> '1.0001'
    229 
    230 -- internal boundaries
    231 dqsub346 subtract '10000e+9'  '7'   -> '9999999999993'
    232 dqsub347 subtract '10000e+9'  '70'   -> '9999999999930'
    233 dqsub348 subtract '10000e+9'  '700'   -> '9999999999300'
    234 dqsub349 subtract '10000e+9'  '7000'   -> '9999999993000'
    235 dqsub350 subtract '10000e+9'  '70000'   -> '9999999930000'
    236 dqsub351 subtract '10000e+9'  '700000'   -> '9999999300000'
    237 dqsub352 subtract '7' '10000e+9'   -> '-9999999999993'
    238 dqsub353 subtract '70' '10000e+9'   -> '-9999999999930'
    239 dqsub354 subtract '700' '10000e+9'   -> '-9999999999300'
    240 dqsub355 subtract '7000' '10000e+9'   -> '-9999999993000'
    241 dqsub356 subtract '70000' '10000e+9'   -> '-9999999930000'
    242 dqsub357 subtract '700000' '10000e+9'   -> '-9999999300000'
    243 
    244 -- zero preservation
    245 dqsub361 subtract 1 '0.0001' -> '0.9999'
    246 dqsub362 subtract 1 '0.00001' -> '0.99999'
    247 dqsub363 subtract 1 '0.000001' -> '0.999999'
    248 dqsub364 subtract 1 '0.0000000000000000000000000000000001' -> '0.9999999999999999999999999999999999'
    249 dqsub365 subtract 1 '0.00000000000000000000000000000000001' -> '1.000000000000000000000000000000000' Inexact Rounded
    250 dqsub366 subtract 1 '0.000000000000000000000000000000000001' -> '1.000000000000000000000000000000000' Inexact Rounded
    251 
    252 -- some funny zeros [in case of bad signum]
    253 dqsub370 subtract 1  0  -> 1
    254 dqsub371 subtract 1 0.  -> 1
    255 dqsub372 subtract 1  .0 -> 1.0
    256 dqsub373 subtract 1 0.0 -> 1.0
    257 dqsub374 subtract  0  1 -> -1
    258 dqsub375 subtract 0.  1 -> -1
    259 dqsub376 subtract  .0 1 -> -1.0
    260 dqsub377 subtract 0.0 1 -> -1.0
    261 
    262 -- leading 0 digit before round
    263 dqsub910 subtract -103519362 -51897955.3 -> -51621406.7
    264 dqsub911 subtract 159579.444 89827.5229 -> 69751.9211
    265 
    266 dqsub920 subtract 333.0000000000000000000000000123456 33.00000000000000000000000001234566 -> 299.9999999999999999999999999999999 Inexact Rounded
    267 dqsub921 subtract 333.0000000000000000000000000123456 33.00000000000000000000000001234565 -> 300.0000000000000000000000000000000 Inexact Rounded
    268 dqsub922 subtract 133.0000000000000000000000000123456 33.00000000000000000000000001234565 ->  99.99999999999999999999999999999995
    269 dqsub923 subtract 133.0000000000000000000000000123456 33.00000000000000000000000001234564 ->  99.99999999999999999999999999999996
    270 dqsub924 subtract 133.0000000000000000000000000123456 33.00000000000000000000000001234540 -> 100.0000000000000000000000000000002 Rounded
    271 dqsub925 subtract 133.0000000000000000000000000123456 43.00000000000000000000000001234560 ->  90.00000000000000000000000000000000
    272 dqsub926 subtract 133.0000000000000000000000000123456 43.00000000000000000000000001234561 ->  89.99999999999999999999999999999999
    273 dqsub927 subtract 133.0000000000000000000000000123456 43.00000000000000000000000001234566 ->  89.99999999999999999999999999999994
    274 dqsub928 subtract 101.0000000000000000000000000123456 91.00000000000000000000000001234566 ->   9.99999999999999999999999999999994
    275 dqsub929 subtract 101.0000000000000000000000000123456 99.00000000000000000000000001234566 ->   1.99999999999999999999999999999994
    276 
    277 -- more LHS swaps [were fixed]
    278 dqsub390 subtract '-56267E-10'   0 ->  '-0.0000056267'
    279 dqsub391 subtract '-56267E-6'    0 ->  '-0.056267'
    280 dqsub392 subtract '-56267E-5'    0 ->  '-0.56267'
    281 dqsub393 subtract '-56267E-4'    0 ->  '-5.6267'
    282 dqsub394 subtract '-56267E-3'    0 ->  '-56.267'
    283 dqsub395 subtract '-56267E-2'    0 ->  '-562.67'
    284 dqsub396 subtract '-56267E-1'    0 ->  '-5626.7'
    285 dqsub397 subtract '-56267E-0'    0 ->  '-56267'
    286 dqsub398 subtract '-5E-10'       0 ->  '-5E-10'
    287 dqsub399 subtract '-5E-7'        0 ->  '-5E-7'
    288 dqsub400 subtract '-5E-6'        0 ->  '-0.000005'
    289 dqsub401 subtract '-5E-5'        0 ->  '-0.00005'
    290 dqsub402 subtract '-5E-4'        0 ->  '-0.0005'
    291 dqsub403 subtract '-5E-1'        0 ->  '-0.5'
    292 dqsub404 subtract '-5E0'         0 ->  '-5'
    293 dqsub405 subtract '-5E1'         0 ->  '-50'
    294 dqsub406 subtract '-5E5'         0 ->  '-500000'
    295 dqsub407 subtract '-5E33'        0 ->  '-5000000000000000000000000000000000'
    296 dqsub408 subtract '-5E34'        0 ->  '-5.000000000000000000000000000000000E+34'  Rounded
    297 dqsub409 subtract '-5E35'        0 ->  '-5.000000000000000000000000000000000E+35'  Rounded
    298 dqsub410 subtract '-5E36'        0 ->  '-5.000000000000000000000000000000000E+36'  Rounded
    299 dqsub411 subtract '-5E100'       0 ->  '-5.000000000000000000000000000000000E+100' Rounded
    300 
    301 -- more RHS swaps [were fixed]
    302 dqsub420 subtract 0  '-56267E-10' ->  '0.0000056267'
    303 dqsub421 subtract 0  '-56267E-6'  ->  '0.056267'
    304 dqsub422 subtract 0  '-56267E-5'  ->  '0.56267'
    305 dqsub423 subtract 0  '-56267E-4'  ->  '5.6267'
    306 dqsub424 subtract 0  '-56267E-3'  ->  '56.267'
    307 dqsub425 subtract 0  '-56267E-2'  ->  '562.67'
    308 dqsub426 subtract 0  '-56267E-1'  ->  '5626.7'
    309 dqsub427 subtract 0  '-56267E-0'  ->  '56267'
    310 dqsub428 subtract 0  '-5E-10'     ->  '5E-10'
    311 dqsub429 subtract 0  '-5E-7'      ->  '5E-7'
    312 dqsub430 subtract 0  '-5E-6'      ->  '0.000005'
    313 dqsub431 subtract 0  '-5E-5'      ->  '0.00005'
    314 dqsub432 subtract 0  '-5E-4'      ->  '0.0005'
    315 dqsub433 subtract 0  '-5E-1'      ->  '0.5'
    316 dqsub434 subtract 0  '-5E0'       ->  '5'
    317 dqsub435 subtract 0  '-5E1'       ->  '50'
    318 dqsub436 subtract 0  '-5E5'       ->  '500000'
    319 dqsub437 subtract 0  '-5E33'      ->  '5000000000000000000000000000000000'
    320 dqsub438 subtract 0  '-5E34'      ->  '5.000000000000000000000000000000000E+34'   Rounded
    321 dqsub439 subtract 0  '-5E35'      ->  '5.000000000000000000000000000000000E+35'   Rounded
    322 dqsub440 subtract 0  '-5E36'      ->  '5.000000000000000000000000000000000E+36'   Rounded
    323 dqsub441 subtract 0  '-5E100'     ->  '5.000000000000000000000000000000000E+100'  Rounded
    324 
    325 
    326 -- try borderline precision, with carries, etc.
    327 dqsub461 subtract '1E+16' '1'        -> '9999999999999999'
    328 dqsub462 subtract '1E+12' '-1.111'   -> '1000000000001.111'
    329 dqsub463 subtract '1.111'  '-1E+12'  -> '1000000000001.111'
    330 dqsub464 subtract '-1'    '-1E+16'   -> '9999999999999999'
    331 dqsub465 subtract '7E+15' '1'        -> '6999999999999999'
    332 dqsub466 subtract '7E+12' '-1.111'   -> '7000000000001.111'
    333 dqsub467 subtract '1.111'  '-7E+12'  -> '7000000000001.111'
    334 dqsub468 subtract '-1'    '-7E+15'   -> '6999999999999999'
    335 
    336 --                   1234567890123456       1234567890123456      1 23456789012345
    337 dqsub470 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555563' -> '1.000000000000000000000000000000001' Inexact Rounded
    338 dqsub471 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555562' -> '1.000000000000000000000000000000001' Inexact Rounded
    339 dqsub472 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555561' -> '1.000000000000000000000000000000000' Inexact Rounded
    340 dqsub473 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555560' -> '1.000000000000000000000000000000000' Inexact Rounded
    341 dqsub474 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555559' -> '1.000000000000000000000000000000000' Inexact Rounded
    342 dqsub475 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555558' -> '1.000000000000000000000000000000000' Inexact Rounded
    343 dqsub476 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555557' -> '1.000000000000000000000000000000000' Inexact Rounded
    344 dqsub477 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555556' -> '1.000000000000000000000000000000000' Rounded
    345 dqsub478 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555555' -> '0.9999999999999999999999999999999999'
    346 dqsub479 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555554' -> '0.9999999999999999999999999999999998'
    347 dqsub480 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555553' -> '0.9999999999999999999999999999999997'
    348 dqsub481 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555552' -> '0.9999999999999999999999999999999996'
    349 dqsub482 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555551' -> '0.9999999999999999999999999999999995'
    350 dqsub483 subtract '0.4444444444444444444444444444444444'  '-0.5555555555555555555555555555555550' -> '0.9999999999999999999999999999999994'
    351 
    352 -- and some more, including residue effects and different roundings
    353 rounding: half_up
    354 dqsub500 subtract '1231234555555555555555555567456789' 0             -> '1231234555555555555555555567456789'
    355 dqsub501 subtract '1231234555555555555555555567456789' 0.000000001   -> '1231234555555555555555555567456789' Inexact Rounded
    356 dqsub502 subtract '1231234555555555555555555567456789' 0.000001      -> '1231234555555555555555555567456789' Inexact Rounded
    357 dqsub503 subtract '1231234555555555555555555567456789' 0.1           -> '1231234555555555555555555567456789' Inexact Rounded
    358 dqsub504 subtract '1231234555555555555555555567456789' 0.4           -> '1231234555555555555555555567456789' Inexact Rounded
    359 dqsub505 subtract '1231234555555555555555555567456789' 0.49          -> '1231234555555555555555555567456789' Inexact Rounded
    360 dqsub506 subtract '1231234555555555555555555567456789' 0.499999      -> '1231234555555555555555555567456789' Inexact Rounded
    361 dqsub507 subtract '1231234555555555555555555567456789' 0.499999999   -> '1231234555555555555555555567456789' Inexact Rounded
    362 dqsub508 subtract '1231234555555555555555555567456789' 0.5           -> '1231234555555555555555555567456789' Inexact Rounded
    363 dqsub509 subtract '1231234555555555555555555567456789' 0.500000001   -> '1231234555555555555555555567456788' Inexact Rounded
    364 dqsub510 subtract '1231234555555555555555555567456789' 0.500001      -> '1231234555555555555555555567456788' Inexact Rounded
    365 dqsub511 subtract '1231234555555555555555555567456789' 0.51          -> '1231234555555555555555555567456788' Inexact Rounded
    366 dqsub512 subtract '1231234555555555555555555567456789' 0.6           -> '1231234555555555555555555567456788' Inexact Rounded
    367 dqsub513 subtract '1231234555555555555555555567456789' 0.9           -> '1231234555555555555555555567456788' Inexact Rounded
    368 dqsub514 subtract '1231234555555555555555555567456789' 0.99999       -> '1231234555555555555555555567456788' Inexact Rounded
    369 dqsub515 subtract '1231234555555555555555555567456789' 0.999999999   -> '1231234555555555555555555567456788' Inexact Rounded
    370 dqsub516 subtract '1231234555555555555555555567456789' 1             -> '1231234555555555555555555567456788'
    371 dqsub517 subtract '1231234555555555555555555567456789' 1.000000001   -> '1231234555555555555555555567456788' Inexact Rounded
    372 dqsub518 subtract '1231234555555555555555555567456789' 1.00001       -> '1231234555555555555555555567456788' Inexact Rounded
    373 dqsub519 subtract '1231234555555555555555555567456789' 1.1           -> '1231234555555555555555555567456788' Inexact Rounded
    374 
    375 rounding: half_even
    376 dqsub520 subtract '1231234555555555555555555567456789' 0             -> '1231234555555555555555555567456789'
    377 dqsub521 subtract '1231234555555555555555555567456789' 0.000000001   -> '1231234555555555555555555567456789' Inexact Rounded
    378 dqsub522 subtract '1231234555555555555555555567456789' 0.000001      -> '1231234555555555555555555567456789' Inexact Rounded
    379 dqsub523 subtract '1231234555555555555555555567456789' 0.1           -> '1231234555555555555555555567456789' Inexact Rounded
    380 dqsub524 subtract '1231234555555555555555555567456789' 0.4           -> '1231234555555555555555555567456789' Inexact Rounded
    381 dqsub525 subtract '1231234555555555555555555567456789' 0.49          -> '1231234555555555555555555567456789' Inexact Rounded
    382 dqsub526 subtract '1231234555555555555555555567456789' 0.499999      -> '1231234555555555555555555567456789' Inexact Rounded
    383 dqsub527 subtract '1231234555555555555555555567456789' 0.499999999   -> '1231234555555555555555555567456789' Inexact Rounded
    384 dqsub528 subtract '1231234555555555555555555567456789' 0.5           -> '1231234555555555555555555567456788' Inexact Rounded
    385 dqsub529 subtract '1231234555555555555555555567456789' 0.500000001   -> '1231234555555555555555555567456788' Inexact Rounded
    386 dqsub530 subtract '1231234555555555555555555567456789' 0.500001      -> '1231234555555555555555555567456788' Inexact Rounded
    387 dqsub531 subtract '1231234555555555555555555567456789' 0.51          -> '1231234555555555555555555567456788' Inexact Rounded
    388 dqsub532 subtract '1231234555555555555555555567456789' 0.6           -> '1231234555555555555555555567456788' Inexact Rounded
    389 dqsub533 subtract '1231234555555555555555555567456789' 0.9           -> '1231234555555555555555555567456788' Inexact Rounded
    390 dqsub534 subtract '1231234555555555555555555567456789' 0.99999       -> '1231234555555555555555555567456788' Inexact Rounded
    391 dqsub535 subtract '1231234555555555555555555567456789' 0.999999999   -> '1231234555555555555555555567456788' Inexact Rounded
    392 dqsub536 subtract '1231234555555555555555555567456789' 1             -> '1231234555555555555555555567456788'
    393 dqsub537 subtract '1231234555555555555555555567456789' 1.00000001    -> '1231234555555555555555555567456788' Inexact Rounded
    394 dqsub538 subtract '1231234555555555555555555567456789' 1.00001       -> '1231234555555555555555555567456788' Inexact Rounded
    395 dqsub539 subtract '1231234555555555555555555567456789' 1.1           -> '1231234555555555555555555567456788' Inexact Rounded
    396 -- critical few with even bottom digit...
    397 dqsub540 subtract '1231234555555555555555555567456788' 0.499999999   -> '1231234555555555555555555567456788' Inexact Rounded
    398 dqsub541 subtract '1231234555555555555555555567456788' 0.5           -> '1231234555555555555555555567456788' Inexact Rounded
    399 dqsub542 subtract '1231234555555555555555555567456788' 0.500000001   -> '1231234555555555555555555567456787' Inexact Rounded
    400 
    401 rounding: down
    402 dqsub550 subtract '1231234555555555555555555567456789' 0             -> '1231234555555555555555555567456789'
    403 dqsub551 subtract '1231234555555555555555555567456789' 0.000000001   -> '1231234555555555555555555567456788' Inexact Rounded
    404 dqsub552 subtract '1231234555555555555555555567456789' 0.000001      -> '1231234555555555555555555567456788' Inexact Rounded
    405 dqsub553 subtract '1231234555555555555555555567456789' 0.1           -> '1231234555555555555555555567456788' Inexact Rounded
    406 dqsub554 subtract '1231234555555555555555555567456789' 0.4           -> '1231234555555555555555555567456788' Inexact Rounded
    407 dqsub555 subtract '1231234555555555555555555567456789' 0.49          -> '1231234555555555555555555567456788' Inexact Rounded
    408 dqsub556 subtract '1231234555555555555555555567456789' 0.499999      -> '1231234555555555555555555567456788' Inexact Rounded
    409 dqsub557 subtract '1231234555555555555555555567456789' 0.499999999   -> '1231234555555555555555555567456788' Inexact Rounded
    410 dqsub558 subtract '1231234555555555555555555567456789' 0.5           -> '1231234555555555555555555567456788' Inexact Rounded
    411 dqsub559 subtract '1231234555555555555555555567456789' 0.500000001   -> '1231234555555555555555555567456788' Inexact Rounded
    412 dqsub560 subtract '1231234555555555555555555567456789' 0.500001      -> '1231234555555555555555555567456788' Inexact Rounded
    413 dqsub561 subtract '1231234555555555555555555567456789' 0.51          -> '1231234555555555555555555567456788' Inexact Rounded
    414 dqsub562 subtract '1231234555555555555555555567456789' 0.6           -> '1231234555555555555555555567456788' Inexact Rounded
    415 dqsub563 subtract '1231234555555555555555555567456789' 0.9           -> '1231234555555555555555555567456788' Inexact Rounded
    416 dqsub564 subtract '1231234555555555555555555567456789' 0.99999       -> '1231234555555555555555555567456788' Inexact Rounded
    417 dqsub565 subtract '1231234555555555555555555567456789' 0.999999999   -> '1231234555555555555555555567456788' Inexact Rounded
    418 dqsub566 subtract '1231234555555555555555555567456789' 1             -> '1231234555555555555555555567456788'
    419 dqsub567 subtract '1231234555555555555555555567456789' 1.00000001    -> '1231234555555555555555555567456787' Inexact Rounded
    420 dqsub568 subtract '1231234555555555555555555567456789' 1.00001       -> '1231234555555555555555555567456787' Inexact Rounded
    421 dqsub569 subtract '1231234555555555555555555567456789' 1.1           -> '1231234555555555555555555567456787' Inexact Rounded
    422 
    423 -- symmetry...
    424 rounding: half_up
    425 dqsub600 subtract 0             '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789'
    426 dqsub601 subtract 0.000000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    427 dqsub602 subtract 0.000001      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    428 dqsub603 subtract 0.1           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    429 dqsub604 subtract 0.4           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    430 dqsub605 subtract 0.49          '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    431 dqsub606 subtract 0.499999      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    432 dqsub607 subtract 0.499999999   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    433 dqsub608 subtract 0.5           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    434 dqsub609 subtract 0.500000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    435 dqsub610 subtract 0.500001      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    436 dqsub611 subtract 0.51          '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    437 dqsub612 subtract 0.6           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    438 dqsub613 subtract 0.9           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    439 dqsub614 subtract 0.99999       '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    440 dqsub615 subtract 0.999999999   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    441 dqsub616 subtract 1             '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788'
    442 dqsub617 subtract 1.000000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    443 dqsub618 subtract 1.00001       '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    444 dqsub619 subtract 1.1           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    445 
    446 rounding: half_even
    447 dqsub620 subtract 0             '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789'
    448 dqsub621 subtract 0.000000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    449 dqsub622 subtract 0.000001      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    450 dqsub623 subtract 0.1           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    451 dqsub624 subtract 0.4           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    452 dqsub625 subtract 0.49          '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    453 dqsub626 subtract 0.499999      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    454 dqsub627 subtract 0.499999999   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789' Inexact Rounded
    455 dqsub628 subtract 0.5           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    456 dqsub629 subtract 0.500000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    457 dqsub630 subtract 0.500001      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    458 dqsub631 subtract 0.51          '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    459 dqsub632 subtract 0.6           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    460 dqsub633 subtract 0.9           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    461 dqsub634 subtract 0.99999       '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    462 dqsub635 subtract 0.999999999   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    463 dqsub636 subtract 1             '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788'
    464 dqsub637 subtract 1.00000001    '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    465 dqsub638 subtract 1.00001       '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    466 dqsub639 subtract 1.1           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    467 -- critical few with even bottom digit...
    468 dqsub640 subtract 0.499999999   '1231234555555555555555555567456788' -> '-1231234555555555555555555567456788' Inexact Rounded
    469 dqsub641 subtract 0.5           '1231234555555555555555555567456788' -> '-1231234555555555555555555567456788' Inexact Rounded
    470 dqsub642 subtract 0.500000001   '1231234555555555555555555567456788' -> '-1231234555555555555555555567456787' Inexact Rounded
    471 
    472 rounding: down
    473 dqsub650 subtract 0             '1231234555555555555555555567456789' -> '-1231234555555555555555555567456789'
    474 dqsub651 subtract 0.000000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    475 dqsub652 subtract 0.000001      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    476 dqsub653 subtract 0.1           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    477 dqsub654 subtract 0.4           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    478 dqsub655 subtract 0.49          '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    479 dqsub656 subtract 0.499999      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    480 dqsub657 subtract 0.499999999   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    481 dqsub658 subtract 0.5           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    482 dqsub659 subtract 0.500000001   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    483 dqsub660 subtract 0.500001      '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    484 dqsub661 subtract 0.51          '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    485 dqsub662 subtract 0.6           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    486 dqsub663 subtract 0.9           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    487 dqsub664 subtract 0.99999       '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    488 dqsub665 subtract 0.999999999   '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788' Inexact Rounded
    489 dqsub666 subtract 1             '1231234555555555555555555567456789' -> '-1231234555555555555555555567456788'
    490 dqsub667 subtract 1.00000001    '1231234555555555555555555567456789' -> '-1231234555555555555555555567456787' Inexact Rounded
    491 dqsub668 subtract 1.00001       '1231234555555555555555555567456789' -> '-1231234555555555555555555567456787' Inexact Rounded
    492 dqsub669 subtract 1.1           '1231234555555555555555555567456789' -> '-1231234555555555555555555567456787' Inexact Rounded
    493 
    494 
    495 -- lots of leading zeros in intermediate result, and showing effects of
    496 -- input rounding would have affected the following
    497 rounding: half_up
    498 dqsub670 subtract '1234567456789' '1234567456788.1' -> 0.9
    499 dqsub671 subtract '1234567456789' '1234567456788.9' -> 0.1
    500 dqsub672 subtract '1234567456789' '1234567456789.1' -> -0.1
    501 dqsub673 subtract '1234567456789' '1234567456789.5' -> -0.5
    502 dqsub674 subtract '1234567456789' '1234567456789.9' -> -0.9
    503 
    504 rounding: half_even
    505 dqsub680 subtract '1234567456789' '1234567456788.1' -> 0.9
    506 dqsub681 subtract '1234567456789' '1234567456788.9' -> 0.1
    507 dqsub682 subtract '1234567456789' '1234567456789.1' -> -0.1
    508 dqsub683 subtract '1234567456789' '1234567456789.5' -> -0.5
    509 dqsub684 subtract '1234567456789' '1234567456789.9' -> -0.9
    510 
    511 dqsub685 subtract '1234567456788' '1234567456787.1' -> 0.9
    512 dqsub686 subtract '1234567456788' '1234567456787.9' -> 0.1
    513 dqsub687 subtract '1234567456788' '1234567456788.1' -> -0.1
    514 dqsub688 subtract '1234567456788' '1234567456788.5' -> -0.5
    515 dqsub689 subtract '1234567456788' '1234567456788.9' -> -0.9
    516 
    517 rounding: down
    518 dqsub690 subtract '1234567456789' '1234567456788.1' -> 0.9
    519 dqsub691 subtract '1234567456789' '1234567456788.9' -> 0.1
    520 dqsub692 subtract '1234567456789' '1234567456789.1' -> -0.1
    521 dqsub693 subtract '1234567456789' '1234567456789.5' -> -0.5
    522 dqsub694 subtract '1234567456789' '1234567456789.9' -> -0.9
    523 
    524 -- Specials
    525 dqsub780 subtract -Inf   Inf   -> -Infinity
    526 dqsub781 subtract -Inf   1000  -> -Infinity
    527 dqsub782 subtract -Inf   1     -> -Infinity
    528 dqsub783 subtract -Inf  -0     -> -Infinity
    529 dqsub784 subtract -Inf  -1     -> -Infinity
    530 dqsub785 subtract -Inf  -1000  -> -Infinity
    531 dqsub787 subtract -1000  Inf   -> -Infinity
    532 dqsub788 subtract -Inf   Inf   -> -Infinity
    533 dqsub789 subtract -1     Inf   -> -Infinity
    534 dqsub790 subtract  0     Inf   -> -Infinity
    535 dqsub791 subtract  1     Inf   -> -Infinity
    536 dqsub792 subtract  1000  Inf   -> -Infinity
    537 
    538 dqsub800 subtract  Inf   Inf   ->  NaN  Invalid_operation
    539 dqsub801 subtract  Inf   1000  ->  Infinity
    540 dqsub802 subtract  Inf   1     ->  Infinity
    541 dqsub803 subtract  Inf   0     ->  Infinity
    542 dqsub804 subtract  Inf  -0     ->  Infinity
    543 dqsub805 subtract  Inf  -1     ->  Infinity
    544 dqsub806 subtract  Inf  -1000  ->  Infinity
    545 dqsub807 subtract  Inf  -Inf   ->  Infinity
    546 dqsub808 subtract -1000 -Inf   ->  Infinity
    547 dqsub809 subtract -Inf  -Inf   ->  NaN  Invalid_operation
    548 dqsub810 subtract -1    -Inf   ->  Infinity
    549 dqsub811 subtract -0    -Inf   ->  Infinity
    550 dqsub812 subtract  0    -Inf   ->  Infinity
    551 dqsub813 subtract  1    -Inf   ->  Infinity
    552 dqsub814 subtract  1000 -Inf   ->  Infinity
    553 dqsub815 subtract  Inf  -Inf   ->  Infinity
    554 
    555 dqsub821 subtract  NaN   Inf   ->  NaN
    556 dqsub822 subtract -NaN   1000  -> -NaN
    557 dqsub823 subtract  NaN   1     ->  NaN
    558 dqsub824 subtract  NaN   0     ->  NaN
    559 dqsub825 subtract  NaN  -0     ->  NaN
    560 dqsub826 subtract  NaN  -1     ->  NaN
    561 dqsub827 subtract  NaN  -1000  ->  NaN
    562 dqsub828 subtract  NaN  -Inf   ->  NaN
    563 dqsub829 subtract -NaN   NaN   -> -NaN
    564 dqsub830 subtract -Inf   NaN   ->  NaN
    565 dqsub831 subtract -1000  NaN   ->  NaN
    566 dqsub832 subtract -1     NaN   ->  NaN
    567 dqsub833 subtract -0     NaN   ->  NaN
    568 dqsub834 subtract  0     NaN   ->  NaN
    569 dqsub835 subtract  1     NaN   ->  NaN
    570 dqsub836 subtract  1000 -NaN   -> -NaN
    571 dqsub837 subtract  Inf   NaN   ->  NaN
    572 
    573 dqsub841 subtract  sNaN  Inf   ->  NaN  Invalid_operation
    574 dqsub842 subtract -sNaN  1000  -> -NaN  Invalid_operation
    575 dqsub843 subtract  sNaN  1     ->  NaN  Invalid_operation
    576 dqsub844 subtract  sNaN  0     ->  NaN  Invalid_operation
    577 dqsub845 subtract  sNaN -0     ->  NaN  Invalid_operation
    578 dqsub846 subtract  sNaN -1     ->  NaN  Invalid_operation
    579 dqsub847 subtract  sNaN -1000  ->  NaN  Invalid_operation
    580 dqsub848 subtract  sNaN  NaN   ->  NaN  Invalid_operation
    581 dqsub849 subtract  sNaN sNaN   ->  NaN  Invalid_operation
    582 dqsub850 subtract  NaN  sNaN   ->  NaN  Invalid_operation
    583 dqsub851 subtract -Inf -sNaN   -> -NaN  Invalid_operation
    584 dqsub852 subtract -1000 sNaN   ->  NaN  Invalid_operation
    585 dqsub853 subtract -1    sNaN   ->  NaN  Invalid_operation
    586 dqsub854 subtract -0    sNaN   ->  NaN  Invalid_operation
    587 dqsub855 subtract  0    sNaN   ->  NaN  Invalid_operation
    588 dqsub856 subtract  1    sNaN   ->  NaN  Invalid_operation
    589 dqsub857 subtract  1000 sNaN   ->  NaN  Invalid_operation
    590 dqsub858 subtract  Inf  sNaN   ->  NaN  Invalid_operation
    591 dqsub859 subtract  NaN  sNaN   ->  NaN  Invalid_operation
    592 
    593 -- propagating NaNs
    594 dqsub861 subtract  NaN01   -Inf     ->  NaN1
    595 dqsub862 subtract -NaN02   -1000    -> -NaN2
    596 dqsub863 subtract  NaN03    1000    ->  NaN3
    597 dqsub864 subtract  NaN04    Inf     ->  NaN4
    598 dqsub865 subtract  NaN05    NaN61   ->  NaN5
    599 dqsub866 subtract -Inf     -NaN71   -> -NaN71
    600 dqsub867 subtract -1000     NaN81   ->  NaN81
    601 dqsub868 subtract  1000     NaN91   ->  NaN91
    602 dqsub869 subtract  Inf      NaN101  ->  NaN101
    603 dqsub871 subtract  sNaN011  -Inf    ->  NaN11  Invalid_operation
    604 dqsub872 subtract  sNaN012  -1000   ->  NaN12  Invalid_operation
    605 dqsub873 subtract -sNaN013   1000   -> -NaN13  Invalid_operation
    606 dqsub874 subtract  sNaN014   NaN171 ->  NaN14  Invalid_operation
    607 dqsub875 subtract  sNaN015  sNaN181 ->  NaN15  Invalid_operation
    608 dqsub876 subtract  NaN016   sNaN191 ->  NaN191 Invalid_operation
    609 dqsub877 subtract -Inf      sNaN201 ->  NaN201 Invalid_operation
    610 dqsub878 subtract -1000     sNaN211 ->  NaN211 Invalid_operation
    611 dqsub879 subtract  1000    -sNaN221 -> -NaN221 Invalid_operation
    612 dqsub880 subtract  Inf      sNaN231 ->  NaN231 Invalid_operation
    613 dqsub881 subtract  NaN025   sNaN241 ->  NaN241 Invalid_operation
    614 
    615 -- edge case spills
    616 dqsub901 subtract  2.E-3  1.002  -> -1.000
    617 dqsub902 subtract  2.0E-3  1.002  -> -1.0000
    618 dqsub903 subtract  2.00E-3  1.0020  -> -1.00000
    619 dqsub904 subtract  2.000E-3  1.00200  -> -1.000000
    620 dqsub905 subtract  2.0000E-3  1.002000  -> -1.0000000
    621 dqsub906 subtract  2.00000E-3  1.0020000  -> -1.00000000
    622 dqsub907 subtract  2.000000E-3  1.00200000  -> -1.000000000
    623 dqsub908 subtract  2.0000000E-3  1.002000000  -> -1.0000000000
    624 
    625 -- subnormals and overflows covered under Add
    626 
    627 -- Examples from SQL proposal (Krishna Kulkarni)
    628 dqsub1125  subtract 130E-2  120E-2 -> 0.10
    629 dqsub1126  subtract 130E-2  12E-1  -> 0.10
    630 dqsub1127  subtract 130E-2  1E0    -> 0.30
    631 dqsub1128  subtract 1E2     1E4    -> -9.9E+3
    632 
    633 -- Null tests
    634 dqsub9990 subtract 10  # -> NaN Invalid_operation
    635 dqsub9991 subtract  # 10 -> NaN Invalid_operation
    636