+++ /dev/null
-------------------------------------------------------------------------\r
--- subtract.decTest -- decimal subtraction --\r
--- Copyright (c) IBM Corporation, 1981, 2008. All rights reserved. --\r
-------------------------------------------------------------------------\r
--- Please see the document "General Decimal Arithmetic Testcases" --\r
--- at http://www2.hursley.ibm.com/decimal for the description of --\r
--- these testcases. --\r
--- --\r
--- These testcases are experimental ('beta' versions), and they --\r
--- may contain errors. They are offered on an as-is basis. In --\r
--- particular, achieving the same results as the tests here is not --\r
--- a guarantee that an implementation complies with any Standard --\r
--- or specification. The tests are not exhaustive. --\r
--- --\r
--- Please send comments, suggestions, and corrections to the author: --\r
--- Mike Cowlishaw, IBM Fellow --\r
--- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --\r
--- mfc@uk.ibm.com --\r
-------------------------------------------------------------------------\r
-version: 2.59\r
-\r
-extended: 1\r
-precision: 9\r
-rounding: half_up\r
-maxExponent: 384\r
-minexponent: -383\r
-\r
--- [first group are 'quick confidence check']\r
-subx001 subtract 0 0 -> '0'\r
-subx002 subtract 1 1 -> '0'\r
-subx003 subtract 1 2 -> '-1'\r
-subx004 subtract 2 1 -> '1'\r
-subx005 subtract 2 2 -> '0'\r
-subx006 subtract 3 2 -> '1'\r
-subx007 subtract 2 3 -> '-1'\r
-\r
-subx011 subtract -0 0 -> '-0'\r
-subx012 subtract -1 1 -> '-2'\r
-subx013 subtract -1 2 -> '-3'\r
-subx014 subtract -2 1 -> '-3'\r
-subx015 subtract -2 2 -> '-4'\r
-subx016 subtract -3 2 -> '-5'\r
-subx017 subtract -2 3 -> '-5'\r
-\r
-subx021 subtract 0 -0 -> '0'\r
-subx022 subtract 1 -1 -> '2'\r
-subx023 subtract 1 -2 -> '3'\r
-subx024 subtract 2 -1 -> '3'\r
-subx025 subtract 2 -2 -> '4'\r
-subx026 subtract 3 -2 -> '5'\r
-subx027 subtract 2 -3 -> '5'\r
-\r
-subx030 subtract 11 1 -> 10\r
-subx031 subtract 10 1 -> 9\r
-subx032 subtract 9 1 -> 8\r
-subx033 subtract 1 1 -> 0\r
-subx034 subtract 0 1 -> -1\r
-subx035 subtract -1 1 -> -2\r
-subx036 subtract -9 1 -> -10\r
-subx037 subtract -10 1 -> -11\r
-subx038 subtract -11 1 -> -12\r
-\r
-subx040 subtract '5.75' '3.3' -> '2.45'\r
-subx041 subtract '5' '-3' -> '8'\r
-subx042 subtract '-5' '-3' -> '-2'\r
-subx043 subtract '-7' '2.5' -> '-9.5'\r
-subx044 subtract '0.7' '0.3' -> '0.4'\r
-subx045 subtract '1.3' '0.3' -> '1.0'\r
-subx046 subtract '1.25' '1.25' -> '0.00'\r
-\r
-subx050 subtract '1.23456789' '1.00000000' -> '0.23456789'\r
-subx051 subtract '1.23456789' '1.00000089' -> '0.23456700'\r
-subx052 subtract '0.5555555559' '0.0000000001' -> '0.555555556' Inexact Rounded\r
-subx053 subtract '0.5555555559' '0.0000000005' -> '0.555555555' Inexact Rounded\r
-subx054 subtract '0.4444444444' '0.1111111111' -> '0.333333333' Inexact Rounded\r
-subx055 subtract '1.0000000000' '0.00000001' -> '0.999999990' Rounded\r
-subx056 subtract '0.4444444444999' '0' -> '0.444444444' Inexact Rounded\r
-subx057 subtract '0.4444444445000' '0' -> '0.444444445' Inexact Rounded\r
-\r
-subx060 subtract '70' '10000e+9' -> '-1.00000000E+13' Inexact Rounded\r
-subx061 subtract '700' '10000e+9' -> '-1.00000000E+13' Inexact Rounded\r
-subx062 subtract '7000' '10000e+9' -> '-9.99999999E+12' Inexact Rounded\r
-subx063 subtract '70000' '10000e+9' -> '-9.99999993E+12' Rounded\r
-subx064 subtract '700000' '10000e+9' -> '-9.99999930E+12' Rounded\r
- -- symmetry:\r
-subx065 subtract '10000e+9' '70' -> '1.00000000E+13' Inexact Rounded\r
-subx066 subtract '10000e+9' '700' -> '1.00000000E+13' Inexact Rounded\r
-subx067 subtract '10000e+9' '7000' -> '9.99999999E+12' Inexact Rounded\r
-subx068 subtract '10000e+9' '70000' -> '9.99999993E+12' Rounded\r
-subx069 subtract '10000e+9' '700000' -> '9.99999930E+12' Rounded\r
-\r
- -- change precision\r
-subx080 subtract '10000e+9' '70000' -> '9.99999993E+12' Rounded\r
-precision: 6\r
-subx081 subtract '10000e+9' '70000' -> '1.00000E+13' Inexact Rounded\r
-precision: 9\r
-\r
- -- some of the next group are really constructor tests\r
-subx090 subtract '00.0' '0.0' -> '0.0'\r
-subx091 subtract '00.0' '0.00' -> '0.00'\r
-subx092 subtract '0.00' '00.0' -> '0.00'\r
-subx093 subtract '00.0' '0.00' -> '0.00'\r
-subx094 subtract '0.00' '00.0' -> '0.00'\r
-subx095 subtract '3' '.3' -> '2.7'\r
-subx096 subtract '3.' '.3' -> '2.7'\r
-subx097 subtract '3.0' '.3' -> '2.7'\r
-subx098 subtract '3.00' '.3' -> '2.70'\r
-subx099 subtract '3' '3' -> '0'\r
-subx100 subtract '3' '+3' -> '0'\r
-subx101 subtract '3' '-3' -> '6'\r
-subx102 subtract '3' '0.3' -> '2.7'\r
-subx103 subtract '3.' '0.3' -> '2.7'\r
-subx104 subtract '3.0' '0.3' -> '2.7'\r
-subx105 subtract '3.00' '0.3' -> '2.70'\r
-subx106 subtract '3' '3.0' -> '0.0'\r
-subx107 subtract '3' '+3.0' -> '0.0'\r
-subx108 subtract '3' '-3.0' -> '6.0'\r
-\r
--- the above all from add; massaged and extended. Now some new ones...\r
--- [particularly important for comparisons]\r
--- NB: -xE-8 below were non-exponents pre-ANSI X3-274, and -1E-7 or 0E-7\r
--- with input rounding.\r
-subx120 subtract '10.23456784' '10.23456789' -> '-5E-8'\r
-subx121 subtract '10.23456785' '10.23456789' -> '-4E-8'\r
-subx122 subtract '10.23456786' '10.23456789' -> '-3E-8'\r
-subx123 subtract '10.23456787' '10.23456789' -> '-2E-8'\r
-subx124 subtract '10.23456788' '10.23456789' -> '-1E-8'\r
-subx125 subtract '10.23456789' '10.23456789' -> '0E-8'\r
-subx126 subtract '10.23456790' '10.23456789' -> '1E-8'\r
-subx127 subtract '10.23456791' '10.23456789' -> '2E-8'\r
-subx128 subtract '10.23456792' '10.23456789' -> '3E-8'\r
-subx129 subtract '10.23456793' '10.23456789' -> '4E-8'\r
-subx130 subtract '10.23456794' '10.23456789' -> '5E-8'\r
-subx131 subtract '10.23456781' '10.23456786' -> '-5E-8'\r
-subx132 subtract '10.23456782' '10.23456786' -> '-4E-8'\r
-subx133 subtract '10.23456783' '10.23456786' -> '-3E-8'\r
-subx134 subtract '10.23456784' '10.23456786' -> '-2E-8'\r
-subx135 subtract '10.23456785' '10.23456786' -> '-1E-8'\r
-subx136 subtract '10.23456786' '10.23456786' -> '0E-8'\r
-subx137 subtract '10.23456787' '10.23456786' -> '1E-8'\r
-subx138 subtract '10.23456788' '10.23456786' -> '2E-8'\r
-subx139 subtract '10.23456789' '10.23456786' -> '3E-8'\r
-subx140 subtract '10.23456790' '10.23456786' -> '4E-8'\r
-subx141 subtract '10.23456791' '10.23456786' -> '5E-8'\r
-subx142 subtract '1' '0.999999999' -> '1E-9'\r
-subx143 subtract '0.999999999' '1' -> '-1E-9'\r
-subx144 subtract '-10.23456780' '-10.23456786' -> '6E-8'\r
-subx145 subtract '-10.23456790' '-10.23456786' -> '-4E-8'\r
-subx146 subtract '-10.23456791' '-10.23456786' -> '-5E-8'\r
-\r
-precision: 3\r
-subx150 subtract '12345678900000' '9999999999999' -> 2.35E+12 Inexact Rounded\r
-subx151 subtract '9999999999999' '12345678900000' -> -2.35E+12 Inexact Rounded\r
-precision: 6\r
-subx152 subtract '12345678900000' '9999999999999' -> 2.34568E+12 Inexact Rounded\r
-subx153 subtract '9999999999999' '12345678900000' -> -2.34568E+12 Inexact Rounded\r
-precision: 9\r
-subx154 subtract '12345678900000' '9999999999999' -> 2.34567890E+12 Inexact Rounded\r
-subx155 subtract '9999999999999' '12345678900000' -> -2.34567890E+12 Inexact Rounded\r
-precision: 12\r
-subx156 subtract '12345678900000' '9999999999999' -> 2.34567890000E+12 Inexact Rounded\r
-subx157 subtract '9999999999999' '12345678900000' -> -2.34567890000E+12 Inexact Rounded\r
-precision: 15\r
-subx158 subtract '12345678900000' '9999999999999' -> 2345678900001\r
-subx159 subtract '9999999999999' '12345678900000' -> -2345678900001\r
-precision: 9\r
-\r
--- additional scaled arithmetic tests [0.97 problem]\r
-subx160 subtract '0' '.1' -> '-0.1'\r
-subx161 subtract '00' '.97983' -> '-0.97983'\r
-subx162 subtract '0' '.9' -> '-0.9'\r
-subx163 subtract '0' '0.102' -> '-0.102'\r
-subx164 subtract '0' '.4' -> '-0.4'\r
-subx165 subtract '0' '.307' -> '-0.307'\r
-subx166 subtract '0' '.43822' -> '-0.43822'\r
-subx167 subtract '0' '.911' -> '-0.911'\r
-subx168 subtract '.0' '.02' -> '-0.02'\r
-subx169 subtract '00' '.392' -> '-0.392'\r
-subx170 subtract '0' '.26' -> '-0.26'\r
-subx171 subtract '0' '0.51' -> '-0.51'\r
-subx172 subtract '0' '.2234' -> '-0.2234'\r
-subx173 subtract '0' '.2' -> '-0.2'\r
-subx174 subtract '.0' '.0008' -> '-0.0008'\r
--- 0. on left\r
-subx180 subtract '0.0' '-.1' -> '0.1'\r
-subx181 subtract '0.00' '-.97983' -> '0.97983'\r
-subx182 subtract '0.0' '-.9' -> '0.9'\r
-subx183 subtract '0.0' '-0.102' -> '0.102'\r
-subx184 subtract '0.0' '-.4' -> '0.4'\r
-subx185 subtract '0.0' '-.307' -> '0.307'\r
-subx186 subtract '0.0' '-.43822' -> '0.43822'\r
-subx187 subtract '0.0' '-.911' -> '0.911'\r
-subx188 subtract '0.0' '-.02' -> '0.02'\r
-subx189 subtract '0.00' '-.392' -> '0.392'\r
-subx190 subtract '0.0' '-.26' -> '0.26'\r
-subx191 subtract '0.0' '-0.51' -> '0.51'\r
-subx192 subtract '0.0' '-.2234' -> '0.2234'\r
-subx193 subtract '0.0' '-.2' -> '0.2'\r
-subx194 subtract '0.0' '-.0008' -> '0.0008'\r
--- negatives of same\r
-subx200 subtract '0' '-.1' -> '0.1'\r
-subx201 subtract '00' '-.97983' -> '0.97983'\r
-subx202 subtract '0' '-.9' -> '0.9'\r
-subx203 subtract '0' '-0.102' -> '0.102'\r
-subx204 subtract '0' '-.4' -> '0.4'\r
-subx205 subtract '0' '-.307' -> '0.307'\r
-subx206 subtract '0' '-.43822' -> '0.43822'\r
-subx207 subtract '0' '-.911' -> '0.911'\r
-subx208 subtract '.0' '-.02' -> '0.02'\r
-subx209 subtract '00' '-.392' -> '0.392'\r
-subx210 subtract '0' '-.26' -> '0.26'\r
-subx211 subtract '0' '-0.51' -> '0.51'\r
-subx212 subtract '0' '-.2234' -> '0.2234'\r
-subx213 subtract '0' '-.2' -> '0.2'\r
-subx214 subtract '.0' '-.0008' -> '0.0008'\r
-\r
--- more fixed, LHS swaps [really the same as testcases under add]\r
-subx220 subtract '-56267E-12' 0 -> '-5.6267E-8'\r
-subx221 subtract '-56267E-11' 0 -> '-5.6267E-7'\r
-subx222 subtract '-56267E-10' 0 -> '-0.0000056267'\r
-subx223 subtract '-56267E-9' 0 -> '-0.000056267'\r
-subx224 subtract '-56267E-8' 0 -> '-0.00056267'\r
-subx225 subtract '-56267E-7' 0 -> '-0.0056267'\r
-subx226 subtract '-56267E-6' 0 -> '-0.056267'\r
-subx227 subtract '-56267E-5' 0 -> '-0.56267'\r
-subx228 subtract '-56267E-2' 0 -> '-562.67'\r
-subx229 subtract '-56267E-1' 0 -> '-5626.7'\r
-subx230 subtract '-56267E-0' 0 -> '-56267'\r
--- symmetry ...\r
-subx240 subtract 0 '-56267E-12' -> '5.6267E-8'\r
-subx241 subtract 0 '-56267E-11' -> '5.6267E-7'\r
-subx242 subtract 0 '-56267E-10' -> '0.0000056267'\r
-subx243 subtract 0 '-56267E-9' -> '0.000056267'\r
-subx244 subtract 0 '-56267E-8' -> '0.00056267'\r
-subx245 subtract 0 '-56267E-7' -> '0.0056267'\r
-subx246 subtract 0 '-56267E-6' -> '0.056267'\r
-subx247 subtract 0 '-56267E-5' -> '0.56267'\r
-subx248 subtract 0 '-56267E-2' -> '562.67'\r
-subx249 subtract 0 '-56267E-1' -> '5626.7'\r
-subx250 subtract 0 '-56267E-0' -> '56267'\r
-\r
--- now some more from the 'new' add\r
-precision: 9\r
-subx301 subtract '1.23456789' '1.00000000' -> '0.23456789'\r
-subx302 subtract '1.23456789' '1.00000011' -> '0.23456778'\r
-\r
-subx311 subtract '0.4444444444' '0.5555555555' -> '-0.111111111' Inexact Rounded\r
-subx312 subtract '0.4444444440' '0.5555555555' -> '-0.111111112' Inexact Rounded\r
-subx313 subtract '0.4444444444' '0.5555555550' -> '-0.111111111' Inexact Rounded\r
-subx314 subtract '0.44444444449' '0' -> '0.444444444' Inexact Rounded\r
-subx315 subtract '0.444444444499' '0' -> '0.444444444' Inexact Rounded\r
-subx316 subtract '0.4444444444999' '0' -> '0.444444444' Inexact Rounded\r
-subx317 subtract '0.4444444445000' '0' -> '0.444444445' Inexact Rounded\r
-subx318 subtract '0.4444444445001' '0' -> '0.444444445' Inexact Rounded\r
-subx319 subtract '0.444444444501' '0' -> '0.444444445' Inexact Rounded\r
-subx320 subtract '0.44444444451' '0' -> '0.444444445' Inexact Rounded\r
-\r
--- some carrying effects\r
-subx321 subtract '0.9998' '0.0000' -> '0.9998'\r
-subx322 subtract '0.9998' '0.0001' -> '0.9997'\r
-subx323 subtract '0.9998' '0.0002' -> '0.9996'\r
-subx324 subtract '0.9998' '0.0003' -> '0.9995'\r
-subx325 subtract '0.9998' '-0.0000' -> '0.9998'\r
-subx326 subtract '0.9998' '-0.0001' -> '0.9999'\r
-subx327 subtract '0.9998' '-0.0002' -> '1.0000'\r
-subx328 subtract '0.9998' '-0.0003' -> '1.0001'\r
-\r
-subx330 subtract '70' '10000e+9' -> '-1.00000000E+13' Inexact Rounded\r
-subx331 subtract '700' '10000e+9' -> '-1.00000000E+13' Inexact Rounded\r
-subx332 subtract '7000' '10000e+9' -> '-9.99999999E+12' Inexact Rounded\r
-subx333 subtract '70000' '10000e+9' -> '-9.99999993E+12' Rounded\r
-subx334 subtract '700000' '10000e+9' -> '-9.99999930E+12' Rounded\r
-subx335 subtract '7000000' '10000e+9' -> '-9.99999300E+12' Rounded\r
--- symmetry:\r
-subx340 subtract '10000e+9' '70' -> '1.00000000E+13' Inexact Rounded\r
-subx341 subtract '10000e+9' '700' -> '1.00000000E+13' Inexact Rounded\r
-subx342 subtract '10000e+9' '7000' -> '9.99999999E+12' Inexact Rounded\r
-subx343 subtract '10000e+9' '70000' -> '9.99999993E+12' Rounded\r
-subx344 subtract '10000e+9' '700000' -> '9.99999930E+12' Rounded\r
-subx345 subtract '10000e+9' '7000000' -> '9.99999300E+12' Rounded\r
-\r
--- same, higher precision\r
-precision: 15\r
-subx346 subtract '10000e+9' '7' -> '9999999999993'\r
-subx347 subtract '10000e+9' '70' -> '9999999999930'\r
-subx348 subtract '10000e+9' '700' -> '9999999999300'\r
-subx349 subtract '10000e+9' '7000' -> '9999999993000'\r
-subx350 subtract '10000e+9' '70000' -> '9999999930000'\r
-subx351 subtract '10000e+9' '700000' -> '9999999300000'\r
-subx352 subtract '7' '10000e+9' -> '-9999999999993'\r
-subx353 subtract '70' '10000e+9' -> '-9999999999930'\r
-subx354 subtract '700' '10000e+9' -> '-9999999999300'\r
-subx355 subtract '7000' '10000e+9' -> '-9999999993000'\r
-subx356 subtract '70000' '10000e+9' -> '-9999999930000'\r
-subx357 subtract '700000' '10000e+9' -> '-9999999300000'\r
-\r
--- zero preservation\r
-precision: 6\r
-subx360 subtract '10000e+9' '70000' -> '1.00000E+13' Inexact Rounded\r
-subx361 subtract 1 '0.0001' -> '0.9999'\r
-subx362 subtract 1 '0.00001' -> '0.99999'\r
-subx363 subtract 1 '0.000001' -> '0.999999'\r
-subx364 subtract 1 '0.0000001' -> '1.00000' Inexact Rounded\r
-subx365 subtract 1 '0.00000001' -> '1.00000' Inexact Rounded\r
-\r
--- some funny zeros [in case of bad signum]\r
-subx370 subtract 1 0 -> 1\r
-subx371 subtract 1 0. -> 1\r
-subx372 subtract 1 .0 -> 1.0\r
-subx373 subtract 1 0.0 -> 1.0\r
-subx374 subtract 0 1 -> -1\r
-subx375 subtract 0. 1 -> -1\r
-subx376 subtract .0 1 -> -1.0\r
-subx377 subtract 0.0 1 -> -1.0\r
-\r
-precision: 9\r
-\r
--- leading 0 digit before round\r
-subx910 subtract -103519362 -51897955.3 -> -51621406.7\r
-subx911 subtract 159579.444 89827.5229 -> 69751.9211\r
-\r
-subx920 subtract 333.123456 33.1234566 -> 299.999999 Inexact Rounded\r
-subx921 subtract 333.123456 33.1234565 -> 300.000000 Inexact Rounded\r
-subx922 subtract 133.123456 33.1234565 -> 99.9999995\r
-subx923 subtract 133.123456 33.1234564 -> 99.9999996\r
-subx924 subtract 133.123456 33.1234540 -> 100.000002 Rounded\r
-subx925 subtract 133.123456 43.1234560 -> 90.0000000\r
-subx926 subtract 133.123456 43.1234561 -> 89.9999999\r
-subx927 subtract 133.123456 43.1234566 -> 89.9999994\r
-subx928 subtract 101.123456 91.1234566 -> 9.9999994\r
-subx929 subtract 101.123456 99.1234566 -> 1.9999994\r
-\r
--- more of the same; probe for cluster boundary problems\r
-precision: 1\r
-subx930 subtract 11 2 -> 9\r
-precision: 2\r
-subx932 subtract 101 2 -> 99\r
-precision: 3\r
-subx934 subtract 101 2.1 -> 98.9\r
-subx935 subtract 101 92.01 -> 8.99\r
-precision: 4\r
-subx936 subtract 101 2.01 -> 98.99\r
-subx937 subtract 101 92.01 -> 8.99\r
-subx938 subtract 101 92.006 -> 8.994\r
-precision: 5\r
-subx939 subtract 101 2.001 -> 98.999\r
-subx940 subtract 101 92.001 -> 8.999\r
-subx941 subtract 101 92.0006 -> 8.9994\r
-precision: 6\r
-subx942 subtract 101 2.0001 -> 98.9999\r
-subx943 subtract 101 92.0001 -> 8.9999\r
-subx944 subtract 101 92.00006 -> 8.99994\r
-precision: 7\r
-subx945 subtract 101 2.00001 -> 98.99999\r
-subx946 subtract 101 92.00001 -> 8.99999\r
-subx947 subtract 101 92.000006 -> 8.999994\r
-precision: 8\r
-subx948 subtract 101 2.000001 -> 98.999999\r
-subx949 subtract 101 92.000001 -> 8.999999\r
-subx950 subtract 101 92.0000006 -> 8.9999994\r
-precision: 9\r
-subx951 subtract 101 2.0000001 -> 98.9999999\r
-subx952 subtract 101 92.0000001 -> 8.9999999\r
-subx953 subtract 101 92.00000006 -> 8.99999994\r
-\r
-precision: 9\r
-\r
--- more LHS swaps [were fixed]\r
-subx390 subtract '-56267E-10' 0 -> '-0.0000056267'\r
-subx391 subtract '-56267E-6' 0 -> '-0.056267'\r
-subx392 subtract '-56267E-5' 0 -> '-0.56267'\r
-subx393 subtract '-56267E-4' 0 -> '-5.6267'\r
-subx394 subtract '-56267E-3' 0 -> '-56.267'\r
-subx395 subtract '-56267E-2' 0 -> '-562.67'\r
-subx396 subtract '-56267E-1' 0 -> '-5626.7'\r
-subx397 subtract '-56267E-0' 0 -> '-56267'\r
-subx398 subtract '-5E-10' 0 -> '-5E-10'\r
-subx399 subtract '-5E-7' 0 -> '-5E-7'\r
-subx400 subtract '-5E-6' 0 -> '-0.000005'\r
-subx401 subtract '-5E-5' 0 -> '-0.00005'\r
-subx402 subtract '-5E-4' 0 -> '-0.0005'\r
-subx403 subtract '-5E-1' 0 -> '-0.5'\r
-subx404 subtract '-5E0' 0 -> '-5'\r
-subx405 subtract '-5E1' 0 -> '-50'\r
-subx406 subtract '-5E5' 0 -> '-500000'\r
-subx407 subtract '-5E8' 0 -> '-500000000'\r
-subx408 subtract '-5E9' 0 -> '-5.00000000E+9' Rounded\r
-subx409 subtract '-5E10' 0 -> '-5.00000000E+10' Rounded\r
-subx410 subtract '-5E11' 0 -> '-5.00000000E+11' Rounded\r
-subx411 subtract '-5E100' 0 -> '-5.00000000E+100' Rounded\r
-\r
--- more RHS swaps [were fixed]\r
-subx420 subtract 0 '-56267E-10' -> '0.0000056267'\r
-subx421 subtract 0 '-56267E-6' -> '0.056267'\r
-subx422 subtract 0 '-56267E-5' -> '0.56267'\r
-subx423 subtract 0 '-56267E-4' -> '5.6267'\r
-subx424 subtract 0 '-56267E-3' -> '56.267'\r
-subx425 subtract 0 '-56267E-2' -> '562.67'\r
-subx426 subtract 0 '-56267E-1' -> '5626.7'\r
-subx427 subtract 0 '-56267E-0' -> '56267'\r
-subx428 subtract 0 '-5E-10' -> '5E-10'\r
-subx429 subtract 0 '-5E-7' -> '5E-7'\r
-subx430 subtract 0 '-5E-6' -> '0.000005'\r
-subx431 subtract 0 '-5E-5' -> '0.00005'\r
-subx432 subtract 0 '-5E-4' -> '0.0005'\r
-subx433 subtract 0 '-5E-1' -> '0.5'\r
-subx434 subtract 0 '-5E0' -> '5'\r
-subx435 subtract 0 '-5E1' -> '50'\r
-subx436 subtract 0 '-5E5' -> '500000'\r
-subx437 subtract 0 '-5E8' -> '500000000'\r
-subx438 subtract 0 '-5E9' -> '5.00000000E+9' Rounded\r
-subx439 subtract 0 '-5E10' -> '5.00000000E+10' Rounded\r
-subx440 subtract 0 '-5E11' -> '5.00000000E+11' Rounded\r
-subx441 subtract 0 '-5E100' -> '5.00000000E+100' Rounded\r
-\r
-\r
--- try borderline precision, with carries, etc.\r
-precision: 15\r
-subx461 subtract '1E+12' '1' -> '999999999999'\r
-subx462 subtract '1E+12' '-1.11' -> '1000000000001.11'\r
-subx463 subtract '1.11' '-1E+12' -> '1000000000001.11'\r
-subx464 subtract '-1' '-1E+12' -> '999999999999'\r
-subx465 subtract '7E+12' '1' -> '6999999999999'\r
-subx466 subtract '7E+12' '-1.11' -> '7000000000001.11'\r
-subx467 subtract '1.11' '-7E+12' -> '7000000000001.11'\r
-subx468 subtract '-1' '-7E+12' -> '6999999999999'\r
-\r
--- 123456789012345 123456789012345 1 23456789012345\r
-subx470 subtract '0.444444444444444' '-0.555555555555563' -> '1.00000000000001' Inexact Rounded\r
-subx471 subtract '0.444444444444444' '-0.555555555555562' -> '1.00000000000001' Inexact Rounded\r
-subx472 subtract '0.444444444444444' '-0.555555555555561' -> '1.00000000000001' Inexact Rounded\r
-subx473 subtract '0.444444444444444' '-0.555555555555560' -> '1.00000000000000' Inexact Rounded\r
-subx474 subtract '0.444444444444444' '-0.555555555555559' -> '1.00000000000000' Inexact Rounded\r
-subx475 subtract '0.444444444444444' '-0.555555555555558' -> '1.00000000000000' Inexact Rounded\r
-subx476 subtract '0.444444444444444' '-0.555555555555557' -> '1.00000000000000' Inexact Rounded\r
-subx477 subtract '0.444444444444444' '-0.555555555555556' -> '1.00000000000000' Rounded\r
-subx478 subtract '0.444444444444444' '-0.555555555555555' -> '0.999999999999999'\r
-subx479 subtract '0.444444444444444' '-0.555555555555554' -> '0.999999999999998'\r
-subx480 subtract '0.444444444444444' '-0.555555555555553' -> '0.999999999999997'\r
-subx481 subtract '0.444444444444444' '-0.555555555555552' -> '0.999999999999996'\r
-subx482 subtract '0.444444444444444' '-0.555555555555551' -> '0.999999999999995'\r
-subx483 subtract '0.444444444444444' '-0.555555555555550' -> '0.999999999999994'\r
-\r
--- and some more, including residue effects and different roundings\r
-precision: 9\r
-rounding: half_up\r
-subx500 subtract '123456789' 0 -> '123456789'\r
-subx501 subtract '123456789' 0.000000001 -> '123456789' Inexact Rounded\r
-subx502 subtract '123456789' 0.000001 -> '123456789' Inexact Rounded\r
-subx503 subtract '123456789' 0.1 -> '123456789' Inexact Rounded\r
-subx504 subtract '123456789' 0.4 -> '123456789' Inexact Rounded\r
-subx505 subtract '123456789' 0.49 -> '123456789' Inexact Rounded\r
-subx506 subtract '123456789' 0.499999 -> '123456789' Inexact Rounded\r
-subx507 subtract '123456789' 0.499999999 -> '123456789' Inexact Rounded\r
-subx508 subtract '123456789' 0.5 -> '123456789' Inexact Rounded\r
-subx509 subtract '123456789' 0.500000001 -> '123456788' Inexact Rounded\r
-subx510 subtract '123456789' 0.500001 -> '123456788' Inexact Rounded\r
-subx511 subtract '123456789' 0.51 -> '123456788' Inexact Rounded\r
-subx512 subtract '123456789' 0.6 -> '123456788' Inexact Rounded\r
-subx513 subtract '123456789' 0.9 -> '123456788' Inexact Rounded\r
-subx514 subtract '123456789' 0.99999 -> '123456788' Inexact Rounded\r
-subx515 subtract '123456789' 0.999999999 -> '123456788' Inexact Rounded\r
-subx516 subtract '123456789' 1 -> '123456788'\r
-subx517 subtract '123456789' 1.000000001 -> '123456788' Inexact Rounded\r
-subx518 subtract '123456789' 1.00001 -> '123456788' Inexact Rounded\r
-subx519 subtract '123456789' 1.1 -> '123456788' Inexact Rounded\r
-\r
-rounding: half_even\r
-subx520 subtract '123456789' 0 -> '123456789'\r
-subx521 subtract '123456789' 0.000000001 -> '123456789' Inexact Rounded\r
-subx522 subtract '123456789' 0.000001 -> '123456789' Inexact Rounded\r
-subx523 subtract '123456789' 0.1 -> '123456789' Inexact Rounded\r
-subx524 subtract '123456789' 0.4 -> '123456789' Inexact Rounded\r
-subx525 subtract '123456789' 0.49 -> '123456789' Inexact Rounded\r
-subx526 subtract '123456789' 0.499999 -> '123456789' Inexact Rounded\r
-subx527 subtract '123456789' 0.499999999 -> '123456789' Inexact Rounded\r
-subx528 subtract '123456789' 0.5 -> '123456788' Inexact Rounded\r
-subx529 subtract '123456789' 0.500000001 -> '123456788' Inexact Rounded\r
-subx530 subtract '123456789' 0.500001 -> '123456788' Inexact Rounded\r
-subx531 subtract '123456789' 0.51 -> '123456788' Inexact Rounded\r
-subx532 subtract '123456789' 0.6 -> '123456788' Inexact Rounded\r
-subx533 subtract '123456789' 0.9 -> '123456788' Inexact Rounded\r
-subx534 subtract '123456789' 0.99999 -> '123456788' Inexact Rounded\r
-subx535 subtract '123456789' 0.999999999 -> '123456788' Inexact Rounded\r
-subx536 subtract '123456789' 1 -> '123456788'\r
-subx537 subtract '123456789' 1.00000001 -> '123456788' Inexact Rounded\r
-subx538 subtract '123456789' 1.00001 -> '123456788' Inexact Rounded\r
-subx539 subtract '123456789' 1.1 -> '123456788' Inexact Rounded\r
--- critical few with even bottom digit...\r
-subx540 subtract '123456788' 0.499999999 -> '123456788' Inexact Rounded\r
-subx541 subtract '123456788' 0.5 -> '123456788' Inexact Rounded\r
-subx542 subtract '123456788' 0.500000001 -> '123456787' Inexact Rounded\r
-\r
-rounding: down\r
-subx550 subtract '123456789' 0 -> '123456789'\r
-subx551 subtract '123456789' 0.000000001 -> '123456788' Inexact Rounded\r
-subx552 subtract '123456789' 0.000001 -> '123456788' Inexact Rounded\r
-subx553 subtract '123456789' 0.1 -> '123456788' Inexact Rounded\r
-subx554 subtract '123456789' 0.4 -> '123456788' Inexact Rounded\r
-subx555 subtract '123456789' 0.49 -> '123456788' Inexact Rounded\r
-subx556 subtract '123456789' 0.499999 -> '123456788' Inexact Rounded\r
-subx557 subtract '123456789' 0.499999999 -> '123456788' Inexact Rounded\r
-subx558 subtract '123456789' 0.5 -> '123456788' Inexact Rounded\r
-subx559 subtract '123456789' 0.500000001 -> '123456788' Inexact Rounded\r
-subx560 subtract '123456789' 0.500001 -> '123456788' Inexact Rounded\r
-subx561 subtract '123456789' 0.51 -> '123456788' Inexact Rounded\r
-subx562 subtract '123456789' 0.6 -> '123456788' Inexact Rounded\r
-subx563 subtract '123456789' 0.9 -> '123456788' Inexact Rounded\r
-subx564 subtract '123456789' 0.99999 -> '123456788' Inexact Rounded\r
-subx565 subtract '123456789' 0.999999999 -> '123456788' Inexact Rounded\r
-subx566 subtract '123456789' 1 -> '123456788'\r
-subx567 subtract '123456789' 1.00000001 -> '123456787' Inexact Rounded\r
-subx568 subtract '123456789' 1.00001 -> '123456787' Inexact Rounded\r
-subx569 subtract '123456789' 1.1 -> '123456787' Inexact Rounded\r
-\r
--- symmetry...\r
-rounding: half_up\r
-subx600 subtract 0 '123456789' -> '-123456789'\r
-subx601 subtract 0.000000001 '123456789' -> '-123456789' Inexact Rounded\r
-subx602 subtract 0.000001 '123456789' -> '-123456789' Inexact Rounded\r
-subx603 subtract 0.1 '123456789' -> '-123456789' Inexact Rounded\r
-subx604 subtract 0.4 '123456789' -> '-123456789' Inexact Rounded\r
-subx605 subtract 0.49 '123456789' -> '-123456789' Inexact Rounded\r
-subx606 subtract 0.499999 '123456789' -> '-123456789' Inexact Rounded\r
-subx607 subtract 0.499999999 '123456789' -> '-123456789' Inexact Rounded\r
-subx608 subtract 0.5 '123456789' -> '-123456789' Inexact Rounded\r
-subx609 subtract 0.500000001 '123456789' -> '-123456788' Inexact Rounded\r
-subx610 subtract 0.500001 '123456789' -> '-123456788' Inexact Rounded\r
-subx611 subtract 0.51 '123456789' -> '-123456788' Inexact Rounded\r
-subx612 subtract 0.6 '123456789' -> '-123456788' Inexact Rounded\r
-subx613 subtract 0.9 '123456789' -> '-123456788' Inexact Rounded\r
-subx614 subtract 0.99999 '123456789' -> '-123456788' Inexact Rounded\r
-subx615 subtract 0.999999999 '123456789' -> '-123456788' Inexact Rounded\r
-subx616 subtract 1 '123456789' -> '-123456788'\r
-subx617 subtract 1.000000001 '123456789' -> '-123456788' Inexact Rounded\r
-subx618 subtract 1.00001 '123456789' -> '-123456788' Inexact Rounded\r
-subx619 subtract 1.1 '123456789' -> '-123456788' Inexact Rounded\r
-\r
-rounding: half_even\r
-subx620 subtract 0 '123456789' -> '-123456789'\r
-subx621 subtract 0.000000001 '123456789' -> '-123456789' Inexact Rounded\r
-subx622 subtract 0.000001 '123456789' -> '-123456789' Inexact Rounded\r
-subx623 subtract 0.1 '123456789' -> '-123456789' Inexact Rounded\r
-subx624 subtract 0.4 '123456789' -> '-123456789' Inexact Rounded\r
-subx625 subtract 0.49 '123456789' -> '-123456789' Inexact Rounded\r
-subx626 subtract 0.499999 '123456789' -> '-123456789' Inexact Rounded\r
-subx627 subtract 0.499999999 '123456789' -> '-123456789' Inexact Rounded\r
-subx628 subtract 0.5 '123456789' -> '-123456788' Inexact Rounded\r
-subx629 subtract 0.500000001 '123456789' -> '-123456788' Inexact Rounded\r
-subx630 subtract 0.500001 '123456789' -> '-123456788' Inexact Rounded\r
-subx631 subtract 0.51 '123456789' -> '-123456788' Inexact Rounded\r
-subx632 subtract 0.6 '123456789' -> '-123456788' Inexact Rounded\r
-subx633 subtract 0.9 '123456789' -> '-123456788' Inexact Rounded\r
-subx634 subtract 0.99999 '123456789' -> '-123456788' Inexact Rounded\r
-subx635 subtract 0.999999999 '123456789' -> '-123456788' Inexact Rounded\r
-subx636 subtract 1 '123456789' -> '-123456788'\r
-subx637 subtract 1.00000001 '123456789' -> '-123456788' Inexact Rounded\r
-subx638 subtract 1.00001 '123456789' -> '-123456788' Inexact Rounded\r
-subx639 subtract 1.1 '123456789' -> '-123456788' Inexact Rounded\r
--- critical few with even bottom digit...\r
-subx640 subtract 0.499999999 '123456788' -> '-123456788' Inexact Rounded\r
-subx641 subtract 0.5 '123456788' -> '-123456788' Inexact Rounded\r
-subx642 subtract 0.500000001 '123456788' -> '-123456787' Inexact Rounded\r
-\r
-rounding: down\r
-subx650 subtract 0 '123456789' -> '-123456789'\r
-subx651 subtract 0.000000001 '123456789' -> '-123456788' Inexact Rounded\r
-subx652 subtract 0.000001 '123456789' -> '-123456788' Inexact Rounded\r
-subx653 subtract 0.1 '123456789' -> '-123456788' Inexact Rounded\r
-subx654 subtract 0.4 '123456789' -> '-123456788' Inexact Rounded\r
-subx655 subtract 0.49 '123456789' -> '-123456788' Inexact Rounded\r
-subx656 subtract 0.499999 '123456789' -> '-123456788' Inexact Rounded\r
-subx657 subtract 0.499999999 '123456789' -> '-123456788' Inexact Rounded\r
-subx658 subtract 0.5 '123456789' -> '-123456788' Inexact Rounded\r
-subx659 subtract 0.500000001 '123456789' -> '-123456788' Inexact Rounded\r
-subx660 subtract 0.500001 '123456789' -> '-123456788' Inexact Rounded\r
-subx661 subtract 0.51 '123456789' -> '-123456788' Inexact Rounded\r
-subx662 subtract 0.6 '123456789' -> '-123456788' Inexact Rounded\r
-subx663 subtract 0.9 '123456789' -> '-123456788' Inexact Rounded\r
-subx664 subtract 0.99999 '123456789' -> '-123456788' Inexact Rounded\r
-subx665 subtract 0.999999999 '123456789' -> '-123456788' Inexact Rounded\r
-subx666 subtract 1 '123456789' -> '-123456788'\r
-subx667 subtract 1.00000001 '123456789' -> '-123456787' Inexact Rounded\r
-subx668 subtract 1.00001 '123456789' -> '-123456787' Inexact Rounded\r
-subx669 subtract 1.1 '123456789' -> '-123456787' Inexact Rounded\r
-\r
-\r
--- lots of leading zeros in intermediate result, and showing effects of\r
--- input rounding would have affected the following\r
-precision: 9\r
-rounding: half_up\r
-subx670 subtract '123456789' '123456788.1' -> 0.9\r
-subx671 subtract '123456789' '123456788.9' -> 0.1\r
-subx672 subtract '123456789' '123456789.1' -> -0.1\r
-subx673 subtract '123456789' '123456789.5' -> -0.5\r
-subx674 subtract '123456789' '123456789.9' -> -0.9\r
-\r
-rounding: half_even\r
-subx680 subtract '123456789' '123456788.1' -> 0.9\r
-subx681 subtract '123456789' '123456788.9' -> 0.1\r
-subx682 subtract '123456789' '123456789.1' -> -0.1\r
-subx683 subtract '123456789' '123456789.5' -> -0.5\r
-subx684 subtract '123456789' '123456789.9' -> -0.9\r
-\r
-subx685 subtract '123456788' '123456787.1' -> 0.9\r
-subx686 subtract '123456788' '123456787.9' -> 0.1\r
-subx687 subtract '123456788' '123456788.1' -> -0.1\r
-subx688 subtract '123456788' '123456788.5' -> -0.5\r
-subx689 subtract '123456788' '123456788.9' -> -0.9\r
-\r
-rounding: down\r
-subx690 subtract '123456789' '123456788.1' -> 0.9\r
-subx691 subtract '123456789' '123456788.9' -> 0.1\r
-subx692 subtract '123456789' '123456789.1' -> -0.1\r
-subx693 subtract '123456789' '123456789.5' -> -0.5\r
-subx694 subtract '123456789' '123456789.9' -> -0.9\r
-\r
--- input preparation tests\r
-rounding: half_up\r
-precision: 3\r
-\r
-subx700 subtract '12345678900000' -9999999999999 -> '2.23E+13' Inexact Rounded\r
-subx701 subtract '9999999999999' -12345678900000 -> '2.23E+13' Inexact Rounded\r
-subx702 subtract '12E+3' '-3456' -> '1.55E+4' Inexact Rounded\r
-subx703 subtract '12E+3' '-3446' -> '1.54E+4' Inexact Rounded\r
-subx704 subtract '12E+3' '-3454' -> '1.55E+4' Inexact Rounded\r
-subx705 subtract '12E+3' '-3444' -> '1.54E+4' Inexact Rounded\r
-\r
-subx706 subtract '3456' '-12E+3' -> '1.55E+4' Inexact Rounded\r
-subx707 subtract '3446' '-12E+3' -> '1.54E+4' Inexact Rounded\r
-subx708 subtract '3454' '-12E+3' -> '1.55E+4' Inexact Rounded\r
-subx709 subtract '3444' '-12E+3' -> '1.54E+4' Inexact Rounded\r
-\r
--- overflow and underflow tests [subnormals now possible]\r
-maxexponent: 999999999\r
-minexponent: -999999999\r
-precision: 9\r
-rounding: down\r
-subx710 subtract 1E+999999999 -9E+999999999 -> 9.99999999E+999999999 Overflow Inexact Rounded\r
-subx711 subtract 9E+999999999 -1E+999999999 -> 9.99999999E+999999999 Overflow Inexact Rounded\r
-rounding: half_up\r
-subx712 subtract 1E+999999999 -9E+999999999 -> Infinity Overflow Inexact Rounded\r
-subx713 subtract 9E+999999999 -1E+999999999 -> Infinity Overflow Inexact Rounded\r
-subx714 subtract -1.1E-999999999 -1E-999999999 -> -1E-1000000000 Subnormal\r
-subx715 subtract 1E-999999999 +1.1e-999999999 -> -1E-1000000000 Subnormal\r
-subx716 subtract -1E+999999999 +9E+999999999 -> -Infinity Overflow Inexact Rounded\r
-subx717 subtract -9E+999999999 +1E+999999999 -> -Infinity Overflow Inexact Rounded\r
-subx718 subtract +1.1E-999999999 +1E-999999999 -> 1E-1000000000 Subnormal\r
-subx719 subtract -1E-999999999 -1.1e-999999999 -> 1E-1000000000 Subnormal\r
-\r
-precision: 3\r
-subx720 subtract 1 9.999E+999999999 -> -Infinity Inexact Overflow Rounded\r
-subx721 subtract 1 -9.999E+999999999 -> Infinity Inexact Overflow Rounded\r
-subx722 subtract 9.999E+999999999 1 -> Infinity Inexact Overflow Rounded\r
-subx723 subtract -9.999E+999999999 1 -> -Infinity Inexact Overflow Rounded\r
-subx724 subtract 1 9.999E+999999999 -> -Infinity Inexact Overflow Rounded\r
-subx725 subtract 1 -9.999E+999999999 -> Infinity Inexact Overflow Rounded\r
-subx726 subtract 9.999E+999999999 1 -> Infinity Inexact Overflow Rounded\r
-subx727 subtract -9.999E+999999999 1 -> -Infinity Inexact Overflow Rounded\r
-\r
--- [more below]\r
-\r
--- long operand checks\r
-maxexponent: 999\r
-minexponent: -999\r
-precision: 9\r
-sub731 subtract 12345678000 0 -> 1.23456780E+10 Rounded\r
-sub732 subtract 0 12345678000 -> -1.23456780E+10 Rounded\r
-sub733 subtract 1234567800 0 -> 1.23456780E+9 Rounded\r
-sub734 subtract 0 1234567800 -> -1.23456780E+9 Rounded\r
-sub735 subtract 1234567890 0 -> 1.23456789E+9 Rounded\r
-sub736 subtract 0 1234567890 -> -1.23456789E+9 Rounded\r
-sub737 subtract 1234567891 0 -> 1.23456789E+9 Inexact Rounded\r
-sub738 subtract 0 1234567891 -> -1.23456789E+9 Inexact Rounded\r
-sub739 subtract 12345678901 0 -> 1.23456789E+10 Inexact Rounded\r
-sub740 subtract 0 12345678901 -> -1.23456789E+10 Inexact Rounded\r
-sub741 subtract 1234567896 0 -> 1.23456790E+9 Inexact Rounded\r
-sub742 subtract 0 1234567896 -> -1.23456790E+9 Inexact Rounded\r
-\r
-precision: 15\r
-sub751 subtract 12345678000 0 -> 12345678000\r
-sub752 subtract 0 12345678000 -> -12345678000\r
-sub753 subtract 1234567800 0 -> 1234567800\r
-sub754 subtract 0 1234567800 -> -1234567800\r
-sub755 subtract 1234567890 0 -> 1234567890\r
-sub756 subtract 0 1234567890 -> -1234567890\r
-sub757 subtract 1234567891 0 -> 1234567891\r
-sub758 subtract 0 1234567891 -> -1234567891\r
-sub759 subtract 12345678901 0 -> 12345678901\r
-sub760 subtract 0 12345678901 -> -12345678901\r
-sub761 subtract 1234567896 0 -> 1234567896\r
-sub762 subtract 0 1234567896 -> -1234567896\r
-\r
--- Specials\r
-subx780 subtract -Inf Inf -> -Infinity\r
-subx781 subtract -Inf 1000 -> -Infinity\r
-subx782 subtract -Inf 1 -> -Infinity\r
-subx783 subtract -Inf -0 -> -Infinity\r
-subx784 subtract -Inf -1 -> -Infinity\r
-subx785 subtract -Inf -1000 -> -Infinity\r
-subx787 subtract -1000 Inf -> -Infinity\r
-subx788 subtract -Inf Inf -> -Infinity\r
-subx789 subtract -1 Inf -> -Infinity\r
-subx790 subtract 0 Inf -> -Infinity\r
-subx791 subtract 1 Inf -> -Infinity\r
-subx792 subtract 1000 Inf -> -Infinity\r
-\r
-subx800 subtract Inf Inf -> NaN Invalid_operation\r
-subx801 subtract Inf 1000 -> Infinity\r
-subx802 subtract Inf 1 -> Infinity\r
-subx803 subtract Inf 0 -> Infinity\r
-subx804 subtract Inf -0 -> Infinity\r
-subx805 subtract Inf -1 -> Infinity\r
-subx806 subtract Inf -1000 -> Infinity\r
-subx807 subtract Inf -Inf -> Infinity\r
-subx808 subtract -1000 -Inf -> Infinity\r
-subx809 subtract -Inf -Inf -> NaN Invalid_operation\r
-subx810 subtract -1 -Inf -> Infinity\r
-subx811 subtract -0 -Inf -> Infinity\r
-subx812 subtract 0 -Inf -> Infinity\r
-subx813 subtract 1 -Inf -> Infinity\r
-subx814 subtract 1000 -Inf -> Infinity\r
-subx815 subtract Inf -Inf -> Infinity\r
-\r
-subx821 subtract NaN Inf -> NaN\r
-subx822 subtract -NaN 1000 -> -NaN\r
-subx823 subtract NaN 1 -> NaN\r
-subx824 subtract NaN 0 -> NaN\r
-subx825 subtract NaN -0 -> NaN\r
-subx826 subtract NaN -1 -> NaN\r
-subx827 subtract NaN -1000 -> NaN\r
-subx828 subtract NaN -Inf -> NaN\r
-subx829 subtract -NaN NaN -> -NaN\r
-subx830 subtract -Inf NaN -> NaN\r
-subx831 subtract -1000 NaN -> NaN\r
-subx832 subtract -1 NaN -> NaN\r
-subx833 subtract -0 NaN -> NaN\r
-subx834 subtract 0 NaN -> NaN\r
-subx835 subtract 1 NaN -> NaN\r
-subx836 subtract 1000 -NaN -> -NaN\r
-subx837 subtract Inf NaN -> NaN\r
-\r
-subx841 subtract sNaN Inf -> NaN Invalid_operation\r
-subx842 subtract -sNaN 1000 -> -NaN Invalid_operation\r
-subx843 subtract sNaN 1 -> NaN Invalid_operation\r
-subx844 subtract sNaN 0 -> NaN Invalid_operation\r
-subx845 subtract sNaN -0 -> NaN Invalid_operation\r
-subx846 subtract sNaN -1 -> NaN Invalid_operation\r
-subx847 subtract sNaN -1000 -> NaN Invalid_operation\r
-subx848 subtract sNaN NaN -> NaN Invalid_operation\r
-subx849 subtract sNaN sNaN -> NaN Invalid_operation\r
-subx850 subtract NaN sNaN -> NaN Invalid_operation\r
-subx851 subtract -Inf -sNaN -> -NaN Invalid_operation\r
-subx852 subtract -1000 sNaN -> NaN Invalid_operation\r
-subx853 subtract -1 sNaN -> NaN Invalid_operation\r
-subx854 subtract -0 sNaN -> NaN Invalid_operation\r
-subx855 subtract 0 sNaN -> NaN Invalid_operation\r
-subx856 subtract 1 sNaN -> NaN Invalid_operation\r
-subx857 subtract 1000 sNaN -> NaN Invalid_operation\r
-subx858 subtract Inf sNaN -> NaN Invalid_operation\r
-subx859 subtract NaN sNaN -> NaN Invalid_operation\r
-\r
--- propagating NaNs\r
-subx861 subtract NaN01 -Inf -> NaN1\r
-subx862 subtract -NaN02 -1000 -> -NaN2\r
-subx863 subtract NaN03 1000 -> NaN3\r
-subx864 subtract NaN04 Inf -> NaN4\r
-subx865 subtract NaN05 NaN61 -> NaN5\r
-subx866 subtract -Inf -NaN71 -> -NaN71\r
-subx867 subtract -1000 NaN81 -> NaN81\r
-subx868 subtract 1000 NaN91 -> NaN91\r
-subx869 subtract Inf NaN101 -> NaN101\r
-subx871 subtract sNaN011 -Inf -> NaN11 Invalid_operation\r
-subx872 subtract sNaN012 -1000 -> NaN12 Invalid_operation\r
-subx873 subtract -sNaN013 1000 -> -NaN13 Invalid_operation\r
-subx874 subtract sNaN014 NaN171 -> NaN14 Invalid_operation\r
-subx875 subtract sNaN015 sNaN181 -> NaN15 Invalid_operation\r
-subx876 subtract NaN016 sNaN191 -> NaN191 Invalid_operation\r
-subx877 subtract -Inf sNaN201 -> NaN201 Invalid_operation\r
-subx878 subtract -1000 sNaN211 -> NaN211 Invalid_operation\r
-subx879 subtract 1000 -sNaN221 -> -NaN221 Invalid_operation\r
-subx880 subtract Inf sNaN231 -> NaN231 Invalid_operation\r
-subx881 subtract NaN025 sNaN241 -> NaN241 Invalid_operation\r
-\r
--- edge case spills\r
-subx901 subtract 2.E-3 1.002 -> -1.000\r
-subx902 subtract 2.0E-3 1.002 -> -1.0000\r
-subx903 subtract 2.00E-3 1.0020 -> -1.00000\r
-subx904 subtract 2.000E-3 1.00200 -> -1.000000\r
-subx905 subtract 2.0000E-3 1.002000 -> -1.0000000\r
-subx906 subtract 2.00000E-3 1.0020000 -> -1.00000000\r
-subx907 subtract 2.000000E-3 1.00200000 -> -1.000000000\r
-subx908 subtract 2.0000000E-3 1.002000000 -> -1.0000000000\r
-\r
--- subnormals and underflows\r
-precision: 3\r
-maxexponent: 999\r
-minexponent: -999\r
-subx1010 subtract 0 1.00E-999 -> -1.00E-999\r
-subx1011 subtract 0 0.1E-999 -> -1E-1000 Subnormal\r
-subx1012 subtract 0 0.10E-999 -> -1.0E-1000 Subnormal\r
-subx1013 subtract 0 0.100E-999 -> -1.0E-1000 Subnormal Rounded\r
-subx1014 subtract 0 0.01E-999 -> -1E-1001 Subnormal\r
--- next is rounded to Emin\r
-subx1015 subtract 0 0.999E-999 -> -1.00E-999 Inexact Rounded Subnormal Underflow\r
-subx1016 subtract 0 0.099E-999 -> -1.0E-1000 Inexact Rounded Subnormal Underflow\r
-subx1017 subtract 0 0.009E-999 -> -1E-1001 Inexact Rounded Subnormal Underflow\r
-subx1018 subtract 0 0.001E-999 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped\r
-subx1019 subtract 0 0.0009E-999 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped\r
-subx1020 subtract 0 0.0001E-999 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped\r
-\r
-subx1030 subtract 0 -1.00E-999 -> 1.00E-999\r
-subx1031 subtract 0 -0.1E-999 -> 1E-1000 Subnormal\r
-subx1032 subtract 0 -0.10E-999 -> 1.0E-1000 Subnormal\r
-subx1033 subtract 0 -0.100E-999 -> 1.0E-1000 Subnormal Rounded\r
-subx1034 subtract 0 -0.01E-999 -> 1E-1001 Subnormal\r
--- next is rounded to Emin\r
-subx1035 subtract 0 -0.999E-999 -> 1.00E-999 Inexact Rounded Subnormal Underflow\r
-subx1036 subtract 0 -0.099E-999 -> 1.0E-1000 Inexact Rounded Subnormal Underflow\r
-subx1037 subtract 0 -0.009E-999 -> 1E-1001 Inexact Rounded Subnormal Underflow\r
-subx1038 subtract 0 -0.001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped\r
-subx1039 subtract 0 -0.0009E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped\r
-subx1040 subtract 0 -0.0001E-999 -> 0E-1001 Inexact Rounded Subnormal Underflow Clamped\r
-\r
--- some non-zero subnormal subtracts\r
--- subx1056 is a tricky case\r
-rounding: half_up\r
-subx1050 subtract 1.00E-999 0.1E-999 -> 9.0E-1000 Subnormal\r
-subx1051 subtract 0.1E-999 0.1E-999 -> 0E-1000\r
-subx1052 subtract 0.10E-999 0.1E-999 -> 0E-1001\r
-subx1053 subtract 0.100E-999 0.1E-999 -> 0E-1001 Clamped\r
-subx1054 subtract 0.01E-999 0.1E-999 -> -9E-1001 Subnormal\r
-subx1055 subtract 0.999E-999 0.1E-999 -> 9.0E-1000 Inexact Rounded Subnormal Underflow\r
-subx1056 subtract 0.099E-999 0.1E-999 -> -0E-1001 Inexact Rounded Subnormal Underflow Clamped\r
-subx1057 subtract 0.009E-999 0.1E-999 -> -9E-1001 Inexact Rounded Subnormal Underflow\r
-subx1058 subtract 0.001E-999 0.1E-999 -> -1.0E-1000 Inexact Rounded Subnormal Underflow\r
-subx1059 subtract 0.0009E-999 0.1E-999 -> -1.0E-1000 Inexact Rounded Subnormal Underflow\r
-subx1060 subtract 0.0001E-999 0.1E-999 -> -1.0E-1000 Inexact Rounded Subnormal Underflow\r
-\r
-\r
--- check for double-rounded subnormals\r
-precision: 5\r
-maxexponent: 79\r
-minexponent: -79\r
-subx1101 subtract 0 1.52444E-80 -> -1.524E-80 Inexact Rounded Subnormal Underflow\r
-subx1102 subtract 0 1.52445E-80 -> -1.524E-80 Inexact Rounded Subnormal Underflow\r
-subx1103 subtract 0 1.52446E-80 -> -1.524E-80 Inexact Rounded Subnormal Underflow\r
-subx1104 subtract 1.52444E-80 0 -> 1.524E-80 Inexact Rounded Subnormal Underflow\r
-subx1105 subtract 1.52445E-80 0 -> 1.524E-80 Inexact Rounded Subnormal Underflow\r
-subx1106 subtract 1.52446E-80 0 -> 1.524E-80 Inexact Rounded Subnormal Underflow\r
-\r
-subx1111 subtract 1.2345678E-80 1.2345671E-80 -> 0E-83 Inexact Rounded Subnormal Underflow Clamped\r
-subx1112 subtract 1.2345678E-80 1.2345618E-80 -> 0E-83 Inexact Rounded Subnormal Underflow Clamped\r
-subx1113 subtract 1.2345678E-80 1.2345178E-80 -> 0E-83 Inexact Rounded Subnormal Underflow Clamped\r
-subx1114 subtract 1.2345678E-80 1.2341678E-80 -> 0E-83 Inexact Rounded Subnormal Underflow Clamped\r
-subx1115 subtract 1.2345678E-80 1.2315678E-80 -> 3E-83 Rounded Subnormal\r
-subx1116 subtract 1.2345678E-80 1.2145678E-80 -> 2.0E-82 Rounded Subnormal\r
-subx1117 subtract 1.2345678E-80 1.1345678E-80 -> 1.00E-81 Rounded Subnormal\r
-subx1118 subtract 1.2345678E-80 0.2345678E-80 -> 1.000E-80 Rounded Subnormal\r
-\r
-precision: 34\r
-rounding: half_up\r
-maxExponent: 6144\r
-minExponent: -6143\r
--- Examples from SQL proposal (Krishna Kulkarni)\r
-subx1125 subtract 130E-2 120E-2 -> 0.10\r
-subx1126 subtract 130E-2 12E-1 -> 0.10\r
-subx1127 subtract 130E-2 1E0 -> 0.30\r
-subx1128 subtract 1E2 1E4 -> -9.9E+3\r
-\r
--- Null tests\r
-subx9990 subtract 10 # -> NaN Invalid_operation\r
-subx9991 subtract # 10 -> NaN Invalid_operation\r