1 ------------------------------------------------------------------------ 2 -- dqAdd.decTest -- decQuad addition -- 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 dqadd001 add 1 1 -> 2 33 dqadd002 add 2 3 -> 5 34 dqadd003 add '5.75' '3.3' -> 9.05 35 dqadd004 add '5' '-3' -> 2 36 dqadd005 add '-5' '-3' -> -8 37 dqadd006 add '-7' '2.5' -> -4.5 38 dqadd007 add '0.7' '0.3' -> 1.0 39 dqadd008 add '1.25' '1.25' -> 2.50 40 dqadd009 add '1.23456789' '1.00000000' -> '2.23456789' 41 dqadd010 add '1.23456789' '1.00000011' -> '2.23456800' 42 43 -- 1234567890123456 1234567890123456 44 dqadd011 add '0.4444444444444444444444444444444446' '0.5555555555555555555555555555555555' -> '1.000000000000000000000000000000000' Inexact Rounded 45 dqadd012 add '0.4444444444444444444444444444444445' '0.5555555555555555555555555555555555' -> '1.000000000000000000000000000000000' Rounded 46 dqadd013 add '0.4444444444444444444444444444444444' '0.5555555555555555555555555555555555' -> '0.9999999999999999999999999999999999' 47 dqadd014 add '4444444444444444444444444444444444' '0.49' -> '4444444444444444444444444444444444' Inexact Rounded 48 dqadd015 add '4444444444444444444444444444444444' '0.499' -> '4444444444444444444444444444444444' Inexact Rounded 49 dqadd016 add '4444444444444444444444444444444444' '0.4999' -> '4444444444444444444444444444444444' Inexact Rounded 50 dqadd017 add '4444444444444444444444444444444444' '0.5000' -> '4444444444444444444444444444444444' Inexact Rounded 51 dqadd018 add '4444444444444444444444444444444444' '0.5001' -> '4444444444444444444444444444444445' Inexact Rounded 52 dqadd019 add '4444444444444444444444444444444444' '0.501' -> '4444444444444444444444444444444445' Inexact Rounded 53 dqadd020 add '4444444444444444444444444444444444' '0.51' -> '4444444444444444444444444444444445' Inexact Rounded 54 55 dqadd021 add 0 1 -> 1 56 dqadd022 add 1 1 -> 2 57 dqadd023 add 2 1 -> 3 58 dqadd024 add 3 1 -> 4 59 dqadd025 add 4 1 -> 5 60 dqadd026 add 5 1 -> 6 61 dqadd027 add 6 1 -> 7 62 dqadd028 add 7 1 -> 8 63 dqadd029 add 8 1 -> 9 64 dqadd030 add 9 1 -> 10 65 66 -- some carrying effects 67 dqadd031 add '0.9998' '0.0000' -> '0.9998' 68 dqadd032 add '0.9998' '0.0001' -> '0.9999' 69 dqadd033 add '0.9998' '0.0002' -> '1.0000' 70 dqadd034 add '0.9998' '0.0003' -> '1.0001' 71 72 dqadd035 add '70' '10000e+34' -> '1.000000000000000000000000000000000E+38' Inexact Rounded 73 dqadd036 add '700' '10000e+34' -> '1.000000000000000000000000000000000E+38' Inexact Rounded 74 dqadd037 add '7000' '10000e+34' -> '1.000000000000000000000000000000000E+38' Inexact Rounded 75 dqadd038 add '70000' '10000e+34' -> '1.000000000000000000000000000000001E+38' Inexact Rounded 76 dqadd039 add '700000' '10000e+34' -> '1.000000000000000000000000000000007E+38' Rounded 77 78 -- symmetry: 79 dqadd040 add '10000e+34' '70' -> '1.000000000000000000000000000000000E+38' Inexact Rounded 80 dqadd041 add '10000e+34' '700' -> '1.000000000000000000000000000000000E+38' Inexact Rounded 81 dqadd042 add '10000e+34' '7000' -> '1.000000000000000000000000000000000E+38' Inexact Rounded 82 dqadd044 add '10000e+34' '70000' -> '1.000000000000000000000000000000001E+38' Inexact Rounded 83 dqadd045 add '10000e+34' '700000' -> '1.000000000000000000000000000000007E+38' Rounded 84 85 -- same, without rounding 86 dqadd046 add '10000e+9' '7' -> '10000000000007' 87 dqadd047 add '10000e+9' '70' -> '10000000000070' 88 dqadd048 add '10000e+9' '700' -> '10000000000700' 89 dqadd049 add '10000e+9' '7000' -> '10000000007000' 90 dqadd050 add '10000e+9' '70000' -> '10000000070000' 91 dqadd051 add '10000e+9' '700000' -> '10000000700000' 92 dqadd052 add '10000e+9' '7000000' -> '10000007000000' 93 94 -- examples from decarith 95 dqadd053 add '12' '7.00' -> '19.00' 96 dqadd054 add '1.3' '-1.07' -> '0.23' 97 dqadd055 add '1.3' '-1.30' -> '0.00' 98 dqadd056 add '1.3' '-2.07' -> '-0.77' 99 dqadd057 add '1E+2' '1E+4' -> '1.01E+4' 100 101 -- leading zero preservation 102 dqadd061 add 1 '0.0001' -> '1.0001' 103 dqadd062 add 1 '0.00001' -> '1.00001' 104 dqadd063 add 1 '0.000001' -> '1.000001' 105 dqadd064 add 1 '0.0000001' -> '1.0000001' 106 dqadd065 add 1 '0.00000001' -> '1.00000001' 107 108 -- some funny zeros [in case of bad signum] 109 dqadd070 add 1 0 -> 1 110 dqadd071 add 1 0. -> 1 111 dqadd072 add 1 .0 -> 1.0 112 dqadd073 add 1 0.0 -> 1.0 113 dqadd074 add 1 0.00 -> 1.00 114 dqadd075 add 0 1 -> 1 115 dqadd076 add 0. 1 -> 1 116 dqadd077 add .0 1 -> 1.0 117 dqadd078 add 0.0 1 -> 1.0 118 dqadd079 add 0.00 1 -> 1.00 119 120 -- some carries 121 dqadd080 add 999999998 1 -> 999999999 122 dqadd081 add 999999999 1 -> 1000000000 123 dqadd082 add 99999999 1 -> 100000000 124 dqadd083 add 9999999 1 -> 10000000 125 dqadd084 add 999999 1 -> 1000000 126 dqadd085 add 99999 1 -> 100000 127 dqadd086 add 9999 1 -> 10000 128 dqadd087 add 999 1 -> 1000 129 dqadd088 add 99 1 -> 100 130 dqadd089 add 9 1 -> 10 131 132 133 -- more LHS swaps 134 dqadd090 add '-56267E-10' 0 -> '-0.0000056267' 135 dqadd091 add '-56267E-6' 0 -> '-0.056267' 136 dqadd092 add '-56267E-5' 0 -> '-0.56267' 137 dqadd093 add '-56267E-4' 0 -> '-5.6267' 138 dqadd094 add '-56267E-3' 0 -> '-56.267' 139 dqadd095 add '-56267E-2' 0 -> '-562.67' 140 dqadd096 add '-56267E-1' 0 -> '-5626.7' 141 dqadd097 add '-56267E-0' 0 -> '-56267' 142 dqadd098 add '-5E-10' 0 -> '-5E-10' 143 dqadd099 add '-5E-7' 0 -> '-5E-7' 144 dqadd100 add '-5E-6' 0 -> '-0.000005' 145 dqadd101 add '-5E-5' 0 -> '-0.00005' 146 dqadd102 add '-5E-4' 0 -> '-0.0005' 147 dqadd103 add '-5E-1' 0 -> '-0.5' 148 dqadd104 add '-5E0' 0 -> '-5' 149 dqadd105 add '-5E1' 0 -> '-50' 150 dqadd106 add '-5E5' 0 -> '-500000' 151 dqadd107 add '-5E33' 0 -> '-5000000000000000000000000000000000' 152 dqadd108 add '-5E34' 0 -> '-5.000000000000000000000000000000000E+34' Rounded 153 dqadd109 add '-5E35' 0 -> '-5.000000000000000000000000000000000E+35' Rounded 154 dqadd110 add '-5E36' 0 -> '-5.000000000000000000000000000000000E+36' Rounded 155 dqadd111 add '-5E100' 0 -> '-5.000000000000000000000000000000000E+100' Rounded 156 157 -- more RHS swaps 158 dqadd113 add 0 '-56267E-10' -> '-0.0000056267' 159 dqadd114 add 0 '-56267E-6' -> '-0.056267' 160 dqadd116 add 0 '-56267E-5' -> '-0.56267' 161 dqadd117 add 0 '-56267E-4' -> '-5.6267' 162 dqadd119 add 0 '-56267E-3' -> '-56.267' 163 dqadd120 add 0 '-56267E-2' -> '-562.67' 164 dqadd121 add 0 '-56267E-1' -> '-5626.7' 165 dqadd122 add 0 '-56267E-0' -> '-56267' 166 dqadd123 add 0 '-5E-10' -> '-5E-10' 167 dqadd124 add 0 '-5E-7' -> '-5E-7' 168 dqadd125 add 0 '-5E-6' -> '-0.000005' 169 dqadd126 add 0 '-5E-5' -> '-0.00005' 170 dqadd127 add 0 '-5E-4' -> '-0.0005' 171 dqadd128 add 0 '-5E-1' -> '-0.5' 172 dqadd129 add 0 '-5E0' -> '-5' 173 dqadd130 add 0 '-5E1' -> '-50' 174 dqadd131 add 0 '-5E5' -> '-500000' 175 dqadd132 add 0 '-5E33' -> '-5000000000000000000000000000000000' 176 dqadd133 add 0 '-5E34' -> '-5.000000000000000000000000000000000E+34' Rounded 177 dqadd134 add 0 '-5E35' -> '-5.000000000000000000000000000000000E+35' Rounded 178 dqadd135 add 0 '-5E36' -> '-5.000000000000000000000000000000000E+36' Rounded 179 dqadd136 add 0 '-5E100' -> '-5.000000000000000000000000000000000E+100' Rounded 180 181 -- related 182 dqadd137 add 1 '0E-39' -> '1.000000000000000000000000000000000' Rounded 183 dqadd138 add -1 '0E-39' -> '-1.000000000000000000000000000000000' Rounded 184 dqadd139 add '0E-39' 1 -> '1.000000000000000000000000000000000' Rounded 185 dqadd140 add '0E-39' -1 -> '-1.000000000000000000000000000000000' Rounded 186 dqadd141 add 1E+29 0.0000 -> '100000000000000000000000000000.0000' 187 dqadd142 add 1E+29 0.00000 -> '100000000000000000000000000000.0000' Rounded 188 dqadd143 add 0.000 1E+30 -> '1000000000000000000000000000000.000' 189 dqadd144 add 0.0000 1E+30 -> '1000000000000000000000000000000.000' Rounded 190 191 -- [some of the next group are really constructor tests] 192 dqadd146 add '00.0' 0 -> '0.0' 193 dqadd147 add '0.00' 0 -> '0.00' 194 dqadd148 add 0 '0.00' -> '0.00' 195 dqadd149 add 0 '00.0' -> '0.0' 196 dqadd150 add '00.0' '0.00' -> '0.00' 197 dqadd151 add '0.00' '00.0' -> '0.00' 198 dqadd152 add '3' '.3' -> '3.3' 199 dqadd153 add '3.' '.3' -> '3.3' 200 dqadd154 add '3.0' '.3' -> '3.3' 201 dqadd155 add '3.00' '.3' -> '3.30' 202 dqadd156 add '3' '3' -> '6' 203 dqadd157 add '3' '+3' -> '6' 204 dqadd158 add '3' '-3' -> '0' 205 dqadd159 add '0.3' '-0.3' -> '0.0' 206 dqadd160 add '0.03' '-0.03' -> '0.00' 207 208 -- try borderline precision, with carries, etc. 209 dqadd161 add '1E+12' '-1' -> '999999999999' 210 dqadd162 add '1E+12' '1.11' -> '1000000000001.11' 211 dqadd163 add '1.11' '1E+12' -> '1000000000001.11' 212 dqadd164 add '-1' '1E+12' -> '999999999999' 213 dqadd165 add '7E+12' '-1' -> '6999999999999' 214 dqadd166 add '7E+12' '1.11' -> '7000000000001.11' 215 dqadd167 add '1.11' '7E+12' -> '7000000000001.11' 216 dqadd168 add '-1' '7E+12' -> '6999999999999' 217 218 rounding: half_up 219 dqadd170 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555567' -> '5.000000000000000000000000000000001' Inexact Rounded 220 dqadd171 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555566' -> '5.000000000000000000000000000000001' Inexact Rounded 221 dqadd172 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555565' -> '5.000000000000000000000000000000001' Inexact Rounded 222 dqadd173 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555564' -> '5.000000000000000000000000000000000' Inexact Rounded 223 dqadd174 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555553' -> '4.999999999999999999999999999999999' Inexact Rounded 224 dqadd175 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555552' -> '4.999999999999999999999999999999999' Inexact Rounded 225 dqadd176 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555551' -> '4.999999999999999999999999999999999' Inexact Rounded 226 dqadd177 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555550' -> '4.999999999999999999999999999999999' Rounded 227 dqadd178 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555545' -> '4.999999999999999999999999999999999' Inexact Rounded 228 dqadd179 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555544' -> '4.999999999999999999999999999999998' Inexact Rounded 229 dqadd180 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555543' -> '4.999999999999999999999999999999998' Inexact Rounded 230 dqadd181 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555542' -> '4.999999999999999999999999999999998' Inexact Rounded 231 dqadd182 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555541' -> '4.999999999999999999999999999999998' Inexact Rounded 232 dqadd183 add '4.444444444444444444444444444444444' '0.5555555555555555555555555555555540' -> '4.999999999999999999999999999999998' Rounded 233 234 -- and some more, including residue effects and different roundings 235 rounding: half_up 236 dqadd200 add '1231234567890123456784560123456789' 0 -> '1231234567890123456784560123456789' 237 dqadd201 add '1231234567890123456784560123456789' 0.000000001 -> '1231234567890123456784560123456789' Inexact Rounded 238 dqadd202 add '1231234567890123456784560123456789' 0.000001 -> '1231234567890123456784560123456789' Inexact Rounded 239 dqadd203 add '1231234567890123456784560123456789' 0.1 -> '1231234567890123456784560123456789' Inexact Rounded 240 dqadd204 add '1231234567890123456784560123456789' 0.4 -> '1231234567890123456784560123456789' Inexact Rounded 241 dqadd205 add '1231234567890123456784560123456789' 0.49 -> '1231234567890123456784560123456789' Inexact Rounded 242 dqadd206 add '1231234567890123456784560123456789' 0.499999 -> '1231234567890123456784560123456789' Inexact Rounded 243 dqadd207 add '1231234567890123456784560123456789' 0.499999999 -> '1231234567890123456784560123456789' Inexact Rounded 244 dqadd208 add '1231234567890123456784560123456789' 0.5 -> '1231234567890123456784560123456790' Inexact Rounded 245 dqadd209 add '1231234567890123456784560123456789' 0.500000001 -> '1231234567890123456784560123456790' Inexact Rounded 246 dqadd210 add '1231234567890123456784560123456789' 0.500001 -> '1231234567890123456784560123456790' Inexact Rounded 247 dqadd211 add '1231234567890123456784560123456789' 0.51 -> '1231234567890123456784560123456790' Inexact Rounded 248 dqadd212 add '1231234567890123456784560123456789' 0.6 -> '1231234567890123456784560123456790' Inexact Rounded 249 dqadd213 add '1231234567890123456784560123456789' 0.9 -> '1231234567890123456784560123456790' Inexact Rounded 250 dqadd214 add '1231234567890123456784560123456789' 0.99999 -> '1231234567890123456784560123456790' Inexact Rounded 251 dqadd215 add '1231234567890123456784560123456789' 0.999999999 -> '1231234567890123456784560123456790' Inexact Rounded 252 dqadd216 add '1231234567890123456784560123456789' 1 -> '1231234567890123456784560123456790' 253 dqadd217 add '1231234567890123456784560123456789' 1.000000001 -> '1231234567890123456784560123456790' Inexact Rounded 254 dqadd218 add '1231234567890123456784560123456789' 1.00001 -> '1231234567890123456784560123456790' Inexact Rounded 255 dqadd219 add '1231234567890123456784560123456789' 1.1 -> '1231234567890123456784560123456790' Inexact Rounded 256 257 rounding: half_even 258 dqadd220 add '1231234567890123456784560123456789' 0 -> '1231234567890123456784560123456789' 259 dqadd221 add '1231234567890123456784560123456789' 0.000000001 -> '1231234567890123456784560123456789' Inexact Rounded 260 dqadd222 add '1231234567890123456784560123456789' 0.000001 -> '1231234567890123456784560123456789' Inexact Rounded 261 dqadd223 add '1231234567890123456784560123456789' 0.1 -> '1231234567890123456784560123456789' Inexact Rounded 262 dqadd224 add '1231234567890123456784560123456789' 0.4 -> '1231234567890123456784560123456789' Inexact Rounded 263 dqadd225 add '1231234567890123456784560123456789' 0.49 -> '1231234567890123456784560123456789' Inexact Rounded 264 dqadd226 add '1231234567890123456784560123456789' 0.499999 -> '1231234567890123456784560123456789' Inexact Rounded 265 dqadd227 add '1231234567890123456784560123456789' 0.499999999 -> '1231234567890123456784560123456789' Inexact Rounded 266 dqadd228 add '1231234567890123456784560123456789' 0.5 -> '1231234567890123456784560123456790' Inexact Rounded 267 dqadd229 add '1231234567890123456784560123456789' 0.500000001 -> '1231234567890123456784560123456790' Inexact Rounded 268 dqadd230 add '1231234567890123456784560123456789' 0.500001 -> '1231234567890123456784560123456790' Inexact Rounded 269 dqadd231 add '1231234567890123456784560123456789' 0.51 -> '1231234567890123456784560123456790' Inexact Rounded 270 dqadd232 add '1231234567890123456784560123456789' 0.6 -> '1231234567890123456784560123456790' Inexact Rounded 271 dqadd233 add '1231234567890123456784560123456789' 0.9 -> '1231234567890123456784560123456790' Inexact Rounded 272 dqadd234 add '1231234567890123456784560123456789' 0.99999 -> '1231234567890123456784560123456790' Inexact Rounded 273 dqadd235 add '1231234567890123456784560123456789' 0.999999999 -> '1231234567890123456784560123456790' Inexact Rounded 274 dqadd236 add '1231234567890123456784560123456789' 1 -> '1231234567890123456784560123456790' 275 dqadd237 add '1231234567890123456784560123456789' 1.00000001 -> '1231234567890123456784560123456790' Inexact Rounded 276 dqadd238 add '1231234567890123456784560123456789' 1.00001 -> '1231234567890123456784560123456790' Inexact Rounded 277 dqadd239 add '1231234567890123456784560123456789' 1.1 -> '1231234567890123456784560123456790' Inexact Rounded 278 -- critical few with even bottom digit... 279 dqadd240 add '1231234567890123456784560123456788' 0.499999999 -> '1231234567890123456784560123456788' Inexact Rounded 280 dqadd241 add '1231234567890123456784560123456788' 0.5 -> '1231234567890123456784560123456788' Inexact Rounded 281 dqadd242 add '1231234567890123456784560123456788' 0.500000001 -> '1231234567890123456784560123456789' Inexact Rounded 282 283 rounding: down 284 dqadd250 add '1231234567890123456784560123456789' 0 -> '1231234567890123456784560123456789' 285 dqadd251 add '1231234567890123456784560123456789' 0.000000001 -> '1231234567890123456784560123456789' Inexact Rounded 286 dqadd252 add '1231234567890123456784560123456789' 0.000001 -> '1231234567890123456784560123456789' Inexact Rounded 287 dqadd253 add '1231234567890123456784560123456789' 0.1 -> '1231234567890123456784560123456789' Inexact Rounded 288 dqadd254 add '1231234567890123456784560123456789' 0.4 -> '1231234567890123456784560123456789' Inexact Rounded 289 dqadd255 add '1231234567890123456784560123456789' 0.49 -> '1231234567890123456784560123456789' Inexact Rounded 290 dqadd256 add '1231234567890123456784560123456789' 0.499999 -> '1231234567890123456784560123456789' Inexact Rounded 291 dqadd257 add '1231234567890123456784560123456789' 0.499999999 -> '1231234567890123456784560123456789' Inexact Rounded 292 dqadd258 add '1231234567890123456784560123456789' 0.5 -> '1231234567890123456784560123456789' Inexact Rounded 293 dqadd259 add '1231234567890123456784560123456789' 0.500000001 -> '1231234567890123456784560123456789' Inexact Rounded 294 dqadd260 add '1231234567890123456784560123456789' 0.500001 -> '1231234567890123456784560123456789' Inexact Rounded 295 dqadd261 add '1231234567890123456784560123456789' 0.51 -> '1231234567890123456784560123456789' Inexact Rounded 296 dqadd262 add '1231234567890123456784560123456789' 0.6 -> '1231234567890123456784560123456789' Inexact Rounded 297 dqadd263 add '1231234567890123456784560123456789' 0.9 -> '1231234567890123456784560123456789' Inexact Rounded 298 dqadd264 add '1231234567890123456784560123456789' 0.99999 -> '1231234567890123456784560123456789' Inexact Rounded 299 dqadd265 add '1231234567890123456784560123456789' 0.999999999 -> '1231234567890123456784560123456789' Inexact Rounded 300 dqadd266 add '1231234567890123456784560123456789' 1 -> '1231234567890123456784560123456790' 301 dqadd267 add '1231234567890123456784560123456789' 1.00000001 -> '1231234567890123456784560123456790' Inexact Rounded 302 dqadd268 add '1231234567890123456784560123456789' 1.00001 -> '1231234567890123456784560123456790' Inexact Rounded 303 dqadd269 add '1231234567890123456784560123456789' 1.1 -> '1231234567890123456784560123456790' Inexact Rounded 304 305 -- 1 in last place tests 306 rounding: half_up 307 dqadd301 add -1 1 -> 0 308 dqadd302 add 0 1 -> 1 309 dqadd303 add 1 1 -> 2 310 dqadd304 add 12 1 -> 13 311 dqadd305 add 98 1 -> 99 312 dqadd306 add 99 1 -> 100 313 dqadd307 add 100 1 -> 101 314 dqadd308 add 101 1 -> 102 315 dqadd309 add -1 -1 -> -2 316 dqadd310 add 0 -1 -> -1 317 dqadd311 add 1 -1 -> 0 318 dqadd312 add 12 -1 -> 11 319 dqadd313 add 98 -1 -> 97 320 dqadd314 add 99 -1 -> 98 321 dqadd315 add 100 -1 -> 99 322 dqadd316 add 101 -1 -> 100 323 324 dqadd321 add -0.01 0.01 -> 0.00 325 dqadd322 add 0.00 0.01 -> 0.01 326 dqadd323 add 0.01 0.01 -> 0.02 327 dqadd324 add 0.12 0.01 -> 0.13 328 dqadd325 add 0.98 0.01 -> 0.99 329 dqadd326 add 0.99 0.01 -> 1.00 330 dqadd327 add 1.00 0.01 -> 1.01 331 dqadd328 add 1.01 0.01 -> 1.02 332 dqadd329 add -0.01 -0.01 -> -0.02 333 dqadd330 add 0.00 -0.01 -> -0.01 334 dqadd331 add 0.01 -0.01 -> 0.00 335 dqadd332 add 0.12 -0.01 -> 0.11 336 dqadd333 add 0.98 -0.01 -> 0.97 337 dqadd334 add 0.99 -0.01 -> 0.98 338 dqadd335 add 1.00 -0.01 -> 0.99 339 dqadd336 add 1.01 -0.01 -> 1.00 340 341 -- some more cases where adding 0 affects the coefficient 342 dqadd340 add 1E+3 0 -> 1000 343 dqadd341 add 1E+33 0 -> 1000000000000000000000000000000000 344 dqadd342 add 1E+34 0 -> 1.000000000000000000000000000000000E+34 Rounded 345 dqadd343 add 1E+35 0 -> 1.000000000000000000000000000000000E+35 Rounded 346 -- which simply follow from these cases ... 347 dqadd344 add 1E+3 1 -> 1001 348 dqadd345 add 1E+33 1 -> 1000000000000000000000000000000001 349 dqadd346 add 1E+34 1 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 350 dqadd347 add 1E+35 1 -> 1.000000000000000000000000000000000E+35 Inexact Rounded 351 dqadd348 add 1E+3 7 -> 1007 352 dqadd349 add 1E+33 7 -> 1000000000000000000000000000000007 353 dqadd350 add 1E+34 7 -> 1.000000000000000000000000000000001E+34 Inexact Rounded 354 dqadd351 add 1E+35 7 -> 1.000000000000000000000000000000000E+35 Inexact Rounded 355 356 -- tryzeros cases 357 rounding: half_up 358 dqadd360 add 0E+50 10000E+1 -> 1.0000E+5 359 dqadd361 add 0E-50 10000E+1 -> 100000.0000000000000000000000000000 Rounded 360 dqadd362 add 10000E+1 0E-50 -> 100000.0000000000000000000000000000 Rounded 361 dqadd363 add 10000E+1 10000E-50 -> 100000.0000000000000000000000000000 Rounded Inexact 362 dqadd364 add 9.999999999999999999999999999999999E+6144 -9.999999999999999999999999999999999E+6144 -> 0E+6111 363 -- 1 234567890123456789012345678901234 364 365 -- a curiosity from JSR 13 testing 366 rounding: half_down 367 dqadd370 add 999999999999999999999999999999999 815 -> 1000000000000000000000000000000814 368 dqadd371 add 9999999999999999999999999999999999 815 -> 1.000000000000000000000000000000081E+34 Rounded Inexact 369 rounding: half_up 370 dqadd372 add 999999999999999999999999999999999 815 -> 1000000000000000000000000000000814 371 dqadd373 add 9999999999999999999999999999999999 815 -> 1.000000000000000000000000000000081E+34 Rounded Inexact 372 rounding: half_even 373 dqadd374 add 999999999999999999999999999999999 815 -> 1000000000000000000000000000000814 374 dqadd375 add 9999999999999999999999999999999999 815 -> 1.000000000000000000000000000000081E+34 Rounded Inexact 375 376 -- ulp replacement tests 377 dqadd400 add 1 77e-32 -> 1.00000000000000000000000000000077 378 dqadd401 add 1 77e-33 -> 1.000000000000000000000000000000077 379 dqadd402 add 1 77e-34 -> 1.000000000000000000000000000000008 Inexact Rounded 380 dqadd403 add 1 77e-35 -> 1.000000000000000000000000000000001 Inexact Rounded 381 dqadd404 add 1 77e-36 -> 1.000000000000000000000000000000000 Inexact Rounded 382 dqadd405 add 1 77e-37 -> 1.000000000000000000000000000000000 Inexact Rounded 383 dqadd406 add 1 77e-299 -> 1.000000000000000000000000000000000 Inexact Rounded 384 385 dqadd410 add 10 77e-32 -> 10.00000000000000000000000000000077 386 dqadd411 add 10 77e-33 -> 10.00000000000000000000000000000008 Inexact Rounded 387 dqadd412 add 10 77e-34 -> 10.00000000000000000000000000000001 Inexact Rounded 388 dqadd413 add 10 77e-35 -> 10.00000000000000000000000000000000 Inexact Rounded 389 dqadd414 add 10 77e-36 -> 10.00000000000000000000000000000000 Inexact Rounded 390 dqadd415 add 10 77e-37 -> 10.00000000000000000000000000000000 Inexact Rounded 391 dqadd416 add 10 77e-299 -> 10.00000000000000000000000000000000 Inexact Rounded 392 393 dqadd420 add 77e-32 1 -> 1.00000000000000000000000000000077 394 dqadd421 add 77e-33 1 -> 1.000000000000000000000000000000077 395 dqadd422 add 77e-34 1 -> 1.000000000000000000000000000000008 Inexact Rounded 396 dqadd423 add 77e-35 1 -> 1.000000000000000000000000000000001 Inexact Rounded 397 dqadd424 add 77e-36 1 -> 1.000000000000000000000000000000000 Inexact Rounded 398 dqadd425 add 77e-37 1 -> 1.000000000000000000000000000000000 Inexact Rounded 399 dqadd426 add 77e-299 1 -> 1.000000000000000000000000000000000 Inexact Rounded 400 401 dqadd430 add 77e-32 10 -> 10.00000000000000000000000000000077 402 dqadd431 add 77e-33 10 -> 10.00000000000000000000000000000008 Inexact Rounded 403 dqadd432 add 77e-34 10 -> 10.00000000000000000000000000000001 Inexact Rounded 404 dqadd433 add 77e-35 10 -> 10.00000000000000000000000000000000 Inexact Rounded 405 dqadd434 add 77e-36 10 -> 10.00000000000000000000000000000000 Inexact Rounded 406 dqadd435 add 77e-37 10 -> 10.00000000000000000000000000000000 Inexact Rounded 407 dqadd436 add 77e-299 10 -> 10.00000000000000000000000000000000 Inexact Rounded 408 409 -- fastpath boundaries 410 -- 1234567890123456789012345678901234 411 dqadd501 add '4444444444444444444444444444444444' '5555555555555555555555555555555555' -> '9999999999999999999999999999999999' 412 dqadd502 add '4444444444444444444444444444444444' '4555555555555555555555555555555555' -> '8999999999999999999999999999999999' 413 dqadd503 add '4444444444444444444444444444444444' '3555555555555555555055555555555555' -> '7999999999999999999499999999999999' 414 dqadd504 add '4444444444444444444444444444444444' '3955555555555555555555555555555555' -> '8399999999999999999999999999999999' 415 dqadd505 add '4444444444444444444444444444444444' '4955555555555555555555555555555555' -> '9399999999999999999999999999999999' 416 dqadd506 add '4444444444444444444444444444444444' '5955555555555555555555555555555555' -> 1.040000000000000000000000000000000E+34 Inexact Rounded 417 dqadd511 add '344444444444444444444444444444444' '555555555555555555555555555555555' -> '899999999999999999999999999999999' 418 dqadd512 add '34444444444444444444444444444444' '55555555555555555555555555555555' -> '89999999999999999999999999999999' 419 dqadd513 add '3444444444444444444444444444444' '5555555555555555555555555555555' -> '8999999999999999999999999999999' 420 dqadd514 add '344444444444444444444444444444' '555555555555555555555555555555' -> '899999999999999999999999999999' 421 dqadd515 add '34444444444444444444444444444' '55555555555555555555555555555' -> '89999999999999999999999999999' 422 dqadd516 add '3444444444444444444444444444' '5555555555555555555555555555' -> '8999999999999999999999999999' 423 dqadd517 add '344444444444444444444444444' '555555555555555555555555555' -> '899999999999999999999999999' 424 dqadd518 add '34444444444444444444444444' '55555555555555555555555555' -> '89999999999999999999999999' 425 dqadd519 add '3444444444444444444444444' '5555555555555555555555555' -> '8999999999999999999999999' 426 dqadd520 add '344444444444444444444444' '555555555555555555555555' -> '899999999999999999999999' 427 dqadd521 add '34444444444444444444444' '55555555555555555555555' -> '89999999999999999999999' 428 dqadd522 add '3444444444444444444444' '5555555555555555555555' -> '8999999999999999999999' 429 dqadd523 add '4444444444444444444444' '3333333333333333333333' -> '7777777777777777777777' 430 dqadd524 add '344444444444444444444' '555555555555555555555' -> '899999999999999999999' 431 dqadd525 add '34444444444444444444' '55555555555555555555' -> '89999999999999999999' 432 dqadd526 add '3444444444444444444' '5555555555555555555' -> '8999999999999999999' 433 dqadd527 add '344444444444444444' '555555555555555555' -> '899999999999999999' 434 dqadd528 add '34444444444444444' '55555555555555555' -> '89999999999999999' 435 dqadd529 add '3444444444444444' '5555555555555555' -> '8999999999999999' 436 dqadd530 add '344444444444444' '555555555555555' -> '899999999999999' 437 dqadd531 add '34444444444444' '55555555555555' -> '89999999999999' 438 dqadd532 add '3444444444444' '5555555555555' -> '8999999999999' 439 dqadd533 add '344444444444' '555555555555' -> '899999999999' 440 dqadd534 add '34444444444' '55555555555' -> '89999999999' 441 dqadd535 add '3444444444' '5555555555' -> '8999999999' 442 dqadd536 add '344444444' '555555555' -> '899999999' 443 dqadd537 add '34444444' '55555555' -> '89999999' 444 dqadd538 add '3444444' '5555555' -> '8999999' 445 dqadd539 add '344444' '555555' -> '899999' 446 dqadd540 add '34444' '55555' -> '89999' 447 dqadd541 add '3444' '5555' -> '8999' 448 dqadd542 add '344' '555' -> '899' 449 dqadd543 add '34' '55' -> '89' 450 dqadd544 add '3' '5' -> '8' 451 452 dqadd545 add '3000004000000000000000000000000000' '3000000000000040000000000000000000' -> '6000004000000040000000000000000000' 453 dqadd546 add '3000000400000000000000000000000000' '4000000000000400000000000000000000' -> '7000000400000400000000000000000000' 454 dqadd547 add '3000000040000000000000000000000000' '5000000000004000000000000000000000' -> '8000000040004000000000000000000000' 455 dqadd548 add '4000000004000000000000000000000000' '3000000000040000000000000000000000' -> '7000000004040000000000000000000000' 456 dqadd549 add '4000000000400000000000000000000000' '4000000000400000000000000000000000' -> '8000000000800000000000000000000000' 457 dqadd550 add '4000000000040000000000000000000000' '5000000004000000000000000000000000' -> '9000000004040000000000000000000000' 458 dqadd551 add '5000000000004000000000000000000000' '3000000040000000000000000000000000' -> '8000000040004000000000000000000000' 459 dqadd552 add '5000000000000400000000000000000000' '4000000400000000000000000000000000' -> '9000000400000400000000000000000000' 460 dqadd553 add '5000000000000040000000000000000000' '5000004000000000000000000000000000' -> 1.000000400000004000000000000000000E+34 Rounded 461 -- check propagation 462 dqadd554 add '8999999999999999999999999999999999' '0000000000000000000000000000000001' -> 9000000000000000000000000000000000 463 dqadd555 add '0000000000000000000000000000000001' '8999999999999999999999999999999999' -> 9000000000000000000000000000000000 464 dqadd556 add '4444444444444444444444444444444444' '4555555555555555555555555555555556' -> 9000000000000000000000000000000000 465 dqadd557 add '4555555555555555555555555555555556' '4444444444444444444444444444444444' -> 9000000000000000000000000000000000 466 467 -- negative ulps 468 dqadd6440 add 1 -77e-32 -> 0.99999999999999999999999999999923 469 dqadd6441 add 1 -77e-33 -> 0.999999999999999999999999999999923 470 dqadd6442 add 1 -77e-34 -> 0.9999999999999999999999999999999923 471 dqadd6443 add 1 -77e-35 -> 0.9999999999999999999999999999999992 Inexact Rounded 472 dqadd6444 add 1 -77e-36 -> 0.9999999999999999999999999999999999 Inexact Rounded 473 dqadd6445 add 1 -77e-37 -> 1.000000000000000000000000000000000 Inexact Rounded 474 dqadd6446 add 1 -77e-99 -> 1.000000000000000000000000000000000 Inexact Rounded 475 476 dqadd6450 add 10 -77e-32 -> 9.99999999999999999999999999999923 477 dqadd6451 add 10 -77e-33 -> 9.999999999999999999999999999999923 478 dqadd6452 add 10 -77e-34 -> 9.999999999999999999999999999999992 Inexact Rounded 479 dqadd6453 add 10 -77e-35 -> 9.999999999999999999999999999999999 Inexact Rounded 480 dqadd6454 add 10 -77e-36 -> 10.00000000000000000000000000000000 Inexact Rounded 481 dqadd6455 add 10 -77e-37 -> 10.00000000000000000000000000000000 Inexact Rounded 482 dqadd6456 add 10 -77e-99 -> 10.00000000000000000000000000000000 Inexact Rounded 483 484 dqadd6460 add -77e-32 1 -> 0.99999999999999999999999999999923 485 dqadd6461 add -77e-33 1 -> 0.999999999999999999999999999999923 486 dqadd6462 add -77e-34 1 -> 0.9999999999999999999999999999999923 487 dqadd6463 add -77e-35 1 -> 0.9999999999999999999999999999999992 Inexact Rounded 488 dqadd6464 add -77e-36 1 -> 0.9999999999999999999999999999999999 Inexact Rounded 489 dqadd6465 add -77e-37 1 -> 1.000000000000000000000000000000000 Inexact Rounded 490 dqadd6466 add -77e-99 1 -> 1.000000000000000000000000000000000 Inexact Rounded 491 492 dqadd6470 add -77e-32 10 -> 9.99999999999999999999999999999923 493 dqadd6471 add -77e-33 10 -> 9.999999999999999999999999999999923 494 dqadd6472 add -77e-34 10 -> 9.999999999999999999999999999999992 Inexact Rounded 495 dqadd6473 add -77e-35 10 -> 9.999999999999999999999999999999999 Inexact Rounded 496 dqadd6474 add -77e-36 10 -> 10.00000000000000000000000000000000 Inexact Rounded 497 dqadd6475 add -77e-37 10 -> 10.00000000000000000000000000000000 Inexact Rounded 498 dqadd6476 add -77e-99 10 -> 10.00000000000000000000000000000000 Inexact Rounded 499 500 -- negative ulps 501 dqadd6480 add -1 77e-32 -> -0.99999999999999999999999999999923 502 dqadd6481 add -1 77e-33 -> -0.999999999999999999999999999999923 503 dqadd6482 add -1 77e-34 -> -0.9999999999999999999999999999999923 504 dqadd6483 add -1 77e-35 -> -0.9999999999999999999999999999999992 Inexact Rounded 505 dqadd6484 add -1 77e-36 -> -0.9999999999999999999999999999999999 Inexact Rounded 506 dqadd6485 add -1 77e-37 -> -1.000000000000000000000000000000000 Inexact Rounded 507 dqadd6486 add -1 77e-99 -> -1.000000000000000000000000000000000 Inexact Rounded 508 509 dqadd6490 add -10 77e-32 -> -9.99999999999999999999999999999923 510 dqadd6491 add -10 77e-33 -> -9.999999999999999999999999999999923 511 dqadd6492 add -10 77e-34 -> -9.999999999999999999999999999999992 Inexact Rounded 512 dqadd6493 add -10 77e-35 -> -9.999999999999999999999999999999999 Inexact Rounded 513 dqadd6494 add -10 77e-36 -> -10.00000000000000000000000000000000 Inexact Rounded 514 dqadd6495 add -10 77e-37 -> -10.00000000000000000000000000000000 Inexact Rounded 515 dqadd6496 add -10 77e-99 -> -10.00000000000000000000000000000000 Inexact Rounded 516 517 dqadd6500 add 77e-32 -1 -> -0.99999999999999999999999999999923 518 dqadd6501 add 77e-33 -1 -> -0.999999999999999999999999999999923 519 dqadd6502 add 77e-34 -1 -> -0.9999999999999999999999999999999923 520 dqadd6503 add 77e-35 -1 -> -0.9999999999999999999999999999999992 Inexact Rounded 521 dqadd6504 add 77e-36 -1 -> -0.9999999999999999999999999999999999 Inexact Rounded 522 dqadd6505 add 77e-37 -1 -> -1.000000000000000000000000000000000 Inexact Rounded 523 dqadd6506 add 77e-99 -1 -> -1.000000000000000000000000000000000 Inexact Rounded 524 525 dqadd6510 add 77e-32 -10 -> -9.99999999999999999999999999999923 526 dqadd6511 add 77e-33 -10 -> -9.999999999999999999999999999999923 527 dqadd6512 add 77e-34 -10 -> -9.999999999999999999999999999999992 Inexact Rounded 528 dqadd6513 add 77e-35 -10 -> -9.999999999999999999999999999999999 Inexact Rounded 529 dqadd6514 add 77e-36 -10 -> -10.00000000000000000000000000000000 Inexact Rounded 530 dqadd6515 add 77e-37 -10 -> -10.00000000000000000000000000000000 Inexact Rounded 531 dqadd6516 add 77e-99 -10 -> -10.00000000000000000000000000000000 Inexact Rounded 532 533 -- and some more residue effects and different roundings 534 rounding: half_up 535 dqadd6540 add '9876543219876543216543210123456789' 0 -> '9876543219876543216543210123456789' 536 dqadd6541 add '9876543219876543216543210123456789' 0.000000001 -> '9876543219876543216543210123456789' Inexact Rounded 537 dqadd6542 add '9876543219876543216543210123456789' 0.000001 -> '9876543219876543216543210123456789' Inexact Rounded 538 dqadd6543 add '9876543219876543216543210123456789' 0.1 -> '9876543219876543216543210123456789' Inexact Rounded 539 dqadd6544 add '9876543219876543216543210123456789' 0.4 -> '9876543219876543216543210123456789' Inexact Rounded 540 dqadd6545 add '9876543219876543216543210123456789' 0.49 -> '9876543219876543216543210123456789' Inexact Rounded 541 dqadd6546 add '9876543219876543216543210123456789' 0.499999 -> '9876543219876543216543210123456789' Inexact Rounded 542 dqadd6547 add '9876543219876543216543210123456789' 0.499999999 -> '9876543219876543216543210123456789' Inexact Rounded 543 dqadd6548 add '9876543219876543216543210123456789' 0.5 -> '9876543219876543216543210123456790' Inexact Rounded 544 dqadd6549 add '9876543219876543216543210123456789' 0.500000001 -> '9876543219876543216543210123456790' Inexact Rounded 545 dqadd6550 add '9876543219876543216543210123456789' 0.500001 -> '9876543219876543216543210123456790' Inexact Rounded 546 dqadd6551 add '9876543219876543216543210123456789' 0.51 -> '9876543219876543216543210123456790' Inexact Rounded 547 dqadd6552 add '9876543219876543216543210123456789' 0.6 -> '9876543219876543216543210123456790' Inexact Rounded 548 dqadd6553 add '9876543219876543216543210123456789' 0.9 -> '9876543219876543216543210123456790' Inexact Rounded 549 dqadd6554 add '9876543219876543216543210123456789' 0.99999 -> '9876543219876543216543210123456790' Inexact Rounded 550 dqadd6555 add '9876543219876543216543210123456789' 0.999999999 -> '9876543219876543216543210123456790' Inexact Rounded 551 dqadd6556 add '9876543219876543216543210123456789' 1 -> '9876543219876543216543210123456790' 552 dqadd6557 add '9876543219876543216543210123456789' 1.000000001 -> '9876543219876543216543210123456790' Inexact Rounded 553 dqadd6558 add '9876543219876543216543210123456789' 1.00001 -> '9876543219876543216543210123456790' Inexact Rounded 554 dqadd6559 add '9876543219876543216543210123456789' 1.1 -> '9876543219876543216543210123456790' Inexact Rounded 555 556 rounding: half_even 557 dqadd6560 add '9876543219876543216543210123456789' 0 -> '9876543219876543216543210123456789' 558 dqadd6561 add '9876543219876543216543210123456789' 0.000000001 -> '9876543219876543216543210123456789' Inexact Rounded 559 dqadd6562 add '9876543219876543216543210123456789' 0.000001 -> '9876543219876543216543210123456789' Inexact Rounded 560 dqadd6563 add '9876543219876543216543210123456789' 0.1 -> '9876543219876543216543210123456789' Inexact Rounded 561 dqadd6564 add '9876543219876543216543210123456789' 0.4 -> '9876543219876543216543210123456789' Inexact Rounded 562 dqadd6565 add '9876543219876543216543210123456789' 0.49 -> '9876543219876543216543210123456789' Inexact Rounded 563 dqadd6566 add '9876543219876543216543210123456789' 0.499999 -> '9876543219876543216543210123456789' Inexact Rounded 564 dqadd6567 add '9876543219876543216543210123456789' 0.499999999 -> '9876543219876543216543210123456789' Inexact Rounded 565 dqadd6568 add '9876543219876543216543210123456789' 0.5 -> '9876543219876543216543210123456790' Inexact Rounded 566 dqadd6569 add '9876543219876543216543210123456789' 0.500000001 -> '9876543219876543216543210123456790' Inexact Rounded 567 dqadd6570 add '9876543219876543216543210123456789' 0.500001 -> '9876543219876543216543210123456790' Inexact Rounded 568 dqadd6571 add '9876543219876543216543210123456789' 0.51 -> '9876543219876543216543210123456790' Inexact Rounded 569 dqadd6572 add '9876543219876543216543210123456789' 0.6 -> '9876543219876543216543210123456790' Inexact Rounded 570 dqadd6573 add '9876543219876543216543210123456789' 0.9 -> '9876543219876543216543210123456790' Inexact Rounded 571 dqadd6574 add '9876543219876543216543210123456789' 0.99999 -> '9876543219876543216543210123456790' Inexact Rounded 572 dqadd6575 add '9876543219876543216543210123456789' 0.999999999 -> '9876543219876543216543210123456790' Inexact Rounded 573 dqadd6576 add '9876543219876543216543210123456789' 1 -> '9876543219876543216543210123456790' 574 dqadd6577 add '9876543219876543216543210123456789' 1.00000001 -> '9876543219876543216543210123456790' Inexact Rounded 575 dqadd6578 add '9876543219876543216543210123456789' 1.00001 -> '9876543219876543216543210123456790' Inexact Rounded 576 dqadd6579 add '9876543219876543216543210123456789' 1.1 -> '9876543219876543216543210123456790' Inexact Rounded 577 578 -- critical few with even bottom digit... 579 dqadd7540 add '9876543219876543216543210123456788' 0.499999999 -> '9876543219876543216543210123456788' Inexact Rounded 580 dqadd7541 add '9876543219876543216543210123456788' 0.5 -> '9876543219876543216543210123456788' Inexact Rounded 581 dqadd7542 add '9876543219876543216543210123456788' 0.500000001 -> '9876543219876543216543210123456789' Inexact Rounded 582 583 rounding: down 584 dqadd7550 add '9876543219876543216543210123456789' 0 -> '9876543219876543216543210123456789' 585 dqadd7551 add '9876543219876543216543210123456789' 0.000000001 -> '9876543219876543216543210123456789' Inexact Rounded 586 dqadd7552 add '9876543219876543216543210123456789' 0.000001 -> '9876543219876543216543210123456789' Inexact Rounded 587 dqadd7553 add '9876543219876543216543210123456789' 0.1 -> '9876543219876543216543210123456789' Inexact Rounded 588 dqadd7554 add '9876543219876543216543210123456789' 0.4 -> '9876543219876543216543210123456789' Inexact Rounded 589 dqadd7555 add '9876543219876543216543210123456789' 0.49 -> '9876543219876543216543210123456789' Inexact Rounded 590 dqadd7556 add '9876543219876543216543210123456789' 0.499999 -> '9876543219876543216543210123456789' Inexact Rounded 591 dqadd7557 add '9876543219876543216543210123456789' 0.499999999 -> '9876543219876543216543210123456789' Inexact Rounded 592 dqadd7558 add '9876543219876543216543210123456789' 0.5 -> '9876543219876543216543210123456789' Inexact Rounded 593 dqadd7559 add '9876543219876543216543210123456789' 0.500000001 -> '9876543219876543216543210123456789' Inexact Rounded 594 dqadd7560 add '9876543219876543216543210123456789' 0.500001 -> '9876543219876543216543210123456789' Inexact Rounded 595 dqadd7561 add '9876543219876543216543210123456789' 0.51 -> '9876543219876543216543210123456789' Inexact Rounded 596 dqadd7562 add '9876543219876543216543210123456789' 0.6 -> '9876543219876543216543210123456789' Inexact Rounded 597 dqadd7563 add '9876543219876543216543210123456789' 0.9 -> '9876543219876543216543210123456789' Inexact Rounded 598 dqadd7564 add '9876543219876543216543210123456789' 0.99999 -> '9876543219876543216543210123456789' Inexact Rounded 599 dqadd7565 add '9876543219876543216543210123456789' 0.999999999 -> '9876543219876543216543210123456789' Inexact Rounded 600 dqadd7566 add '9876543219876543216543210123456789' 1 -> '9876543219876543216543210123456790' 601 dqadd7567 add '9876543219876543216543210123456789' 1.00000001 -> '9876543219876543216543210123456790' Inexact Rounded 602 dqadd7568 add '9876543219876543216543210123456789' 1.00001 -> '9876543219876543216543210123456790' Inexact Rounded 603 dqadd7569 add '9876543219876543216543210123456789' 1.1 -> '9876543219876543216543210123456790' Inexact Rounded 604 605 -- more zeros, etc. 606 rounding: half_even 607 608 dqadd7701 add 5.00 1.00E-3 -> 5.00100 609 dqadd7702 add 00.00 0.000 -> 0.000 610 dqadd7703 add 00.00 0E-3 -> 0.000 611 dqadd7704 add 0E-3 00.00 -> 0.000 612 613 dqadd7710 add 0E+3 00.00 -> 0.00 614 dqadd7711 add 0E+3 00.0 -> 0.0 615 dqadd7712 add 0E+3 00. -> 0 616 dqadd7713 add 0E+3 00.E+1 -> 0E+1 617 dqadd7714 add 0E+3 00.E+2 -> 0E+2 618 dqadd7715 add 0E+3 00.E+3 -> 0E+3 619 dqadd7716 add 0E+3 00.E+4 -> 0E+3 620 dqadd7717 add 0E+3 00.E+5 -> 0E+3 621 dqadd7718 add 0E+3 -00.0 -> 0.0 622 dqadd7719 add 0E+3 -00. -> 0 623 dqadd7731 add 0E+3 -00.E+1 -> 0E+1 624 625 dqadd7720 add 00.00 0E+3 -> 0.00 626 dqadd7721 add 00.0 0E+3 -> 0.0 627 dqadd7722 add 00. 0E+3 -> 0 628 dqadd7723 add 00.E+1 0E+3 -> 0E+1 629 dqadd7724 add 00.E+2 0E+3 -> 0E+2 630 dqadd7725 add 00.E+3 0E+3 -> 0E+3 631 dqadd7726 add 00.E+4 0E+3 -> 0E+3 632 dqadd7727 add 00.E+5 0E+3 -> 0E+3 633 dqadd7728 add -00.00 0E+3 -> 0.00 634 dqadd7729 add -00.0 0E+3 -> 0.0 635 dqadd7730 add -00. 0E+3 -> 0 636 637 dqadd7732 add 0 0 -> 0 638 dqadd7733 add 0 -0 -> 0 639 dqadd7734 add -0 0 -> 0 640 dqadd7735 add -0 -0 -> -0 -- IEEE 754 special case 641 642 dqadd7736 add 1 -1 -> 0 643 dqadd7737 add -1 -1 -> -2 644 dqadd7738 add 1 1 -> 2 645 dqadd7739 add -1 1 -> 0 646 647 dqadd7741 add 0 -1 -> -1 648 dqadd7742 add -0 -1 -> -1 649 dqadd7743 add 0 1 -> 1 650 dqadd7744 add -0 1 -> 1 651 dqadd7745 add -1 0 -> -1 652 dqadd7746 add -1 -0 -> -1 653 dqadd7747 add 1 0 -> 1 654 dqadd7748 add 1 -0 -> 1 655 656 dqadd7751 add 0.0 -1 -> -1.0 657 dqadd7752 add -0.0 -1 -> -1.0 658 dqadd7753 add 0.0 1 -> 1.0 659 dqadd7754 add -0.0 1 -> 1.0 660 dqadd7755 add -1.0 0 -> -1.0 661 dqadd7756 add -1.0 -0 -> -1.0 662 dqadd7757 add 1.0 0 -> 1.0 663 dqadd7758 add 1.0 -0 -> 1.0 664 665 dqadd7761 add 0 -1.0 -> -1.0 666 dqadd7762 add -0 -1.0 -> -1.0 667 dqadd7763 add 0 1.0 -> 1.0 668 dqadd7764 add -0 1.0 -> 1.0 669 dqadd7765 add -1 0.0 -> -1.0 670 dqadd7766 add -1 -0.0 -> -1.0 671 dqadd7767 add 1 0.0 -> 1.0 672 dqadd7768 add 1 -0.0 -> 1.0 673 674 dqadd7771 add 0.0 -1.0 -> -1.0 675 dqadd7772 add -0.0 -1.0 -> -1.0 676 dqadd7773 add 0.0 1.0 -> 1.0 677 dqadd7774 add -0.0 1.0 -> 1.0 678 dqadd7775 add -1.0 0.0 -> -1.0 679 dqadd7776 add -1.0 -0.0 -> -1.0 680 dqadd7777 add 1.0 0.0 -> 1.0 681 dqadd7778 add 1.0 -0.0 -> 1.0 682 683 -- Specials 684 dqadd7780 add -Inf -Inf -> -Infinity 685 dqadd7781 add -Inf -1000 -> -Infinity 686 dqadd7782 add -Inf -1 -> -Infinity 687 dqadd7783 add -Inf -0 -> -Infinity 688 dqadd7784 add -Inf 0 -> -Infinity 689 dqadd7785 add -Inf 1 -> -Infinity 690 dqadd7786 add -Inf 1000 -> -Infinity 691 dqadd7787 add -1000 -Inf -> -Infinity 692 dqadd7788 add -Inf -Inf -> -Infinity 693 dqadd7789 add -1 -Inf -> -Infinity 694 dqadd7790 add -0 -Inf -> -Infinity 695 dqadd7791 add 0 -Inf -> -Infinity 696 dqadd7792 add 1 -Inf -> -Infinity 697 dqadd7793 add 1000 -Inf -> -Infinity 698 dqadd7794 add Inf -Inf -> NaN Invalid_operation 699 700 dqadd7800 add Inf -Inf -> NaN Invalid_operation 701 dqadd7801 add Inf -1000 -> Infinity 702 dqadd7802 add Inf -1 -> Infinity 703 dqadd7803 add Inf -0 -> Infinity 704 dqadd7804 add Inf 0 -> Infinity 705 dqadd7805 add Inf 1 -> Infinity 706 dqadd7806 add Inf 1000 -> Infinity 707 dqadd7807 add Inf Inf -> Infinity 708 dqadd7808 add -1000 Inf -> Infinity 709 dqadd7809 add -Inf Inf -> NaN Invalid_operation 710 dqadd7810 add -1 Inf -> Infinity 711 dqadd7811 add -0 Inf -> Infinity 712 dqadd7812 add 0 Inf -> Infinity 713 dqadd7813 add 1 Inf -> Infinity 714 dqadd7814 add 1000 Inf -> Infinity 715 dqadd7815 add Inf Inf -> Infinity 716 717 dqadd7821 add NaN -Inf -> NaN 718 dqadd7822 add NaN -1000 -> NaN 719 dqadd7823 add NaN -1 -> NaN 720 dqadd7824 add NaN -0 -> NaN 721 dqadd7825 add NaN 0 -> NaN 722 dqadd7826 add NaN 1 -> NaN 723 dqadd7827 add NaN 1000 -> NaN 724 dqadd7828 add NaN Inf -> NaN 725 dqadd7829 add NaN NaN -> NaN 726 dqadd7830 add -Inf NaN -> NaN 727 dqadd7831 add -1000 NaN -> NaN 728 dqadd7832 add -1 NaN -> NaN 729 dqadd7833 add -0 NaN -> NaN 730 dqadd7834 add 0 NaN -> NaN 731 dqadd7835 add 1 NaN -> NaN 732 dqadd7836 add 1000 NaN -> NaN 733 dqadd7837 add Inf NaN -> NaN 734 735 dqadd7841 add sNaN -Inf -> NaN Invalid_operation 736 dqadd7842 add sNaN -1000 -> NaN Invalid_operation 737 dqadd7843 add sNaN -1 -> NaN Invalid_operation 738 dqadd7844 add sNaN -0 -> NaN Invalid_operation 739 dqadd7845 add sNaN 0 -> NaN Invalid_operation 740 dqadd7846 add sNaN 1 -> NaN Invalid_operation 741 dqadd7847 add sNaN 1000 -> NaN Invalid_operation 742 dqadd7848 add sNaN NaN -> NaN Invalid_operation 743 dqadd7849 add sNaN sNaN -> NaN Invalid_operation 744 dqadd7850 add NaN sNaN -> NaN Invalid_operation 745 dqadd7851 add -Inf sNaN -> NaN Invalid_operation 746 dqadd7852 add -1000 sNaN -> NaN Invalid_operation 747 dqadd7853 add -1 sNaN -> NaN Invalid_operation 748 dqadd7854 add -0 sNaN -> NaN Invalid_operation 749 dqadd7855 add 0 sNaN -> NaN Invalid_operation 750 dqadd7856 add 1 sNaN -> NaN Invalid_operation 751 dqadd7857 add 1000 sNaN -> NaN Invalid_operation 752 dqadd7858 add Inf sNaN -> NaN Invalid_operation 753 dqadd7859 add NaN sNaN -> NaN Invalid_operation 754 755 -- propagating NaNs 756 dqadd7861 add NaN1 -Inf -> NaN1 757 dqadd7862 add +NaN2 -1000 -> NaN2 758 dqadd7863 add NaN3 1000 -> NaN3 759 dqadd7864 add NaN4 Inf -> NaN4 760 dqadd7865 add NaN5 +NaN6 -> NaN5 761 dqadd7866 add -Inf NaN7 -> NaN7 762 dqadd7867 add -1000 NaN8 -> NaN8 763 dqadd7868 add 1000 NaN9 -> NaN9 764 dqadd7869 add Inf +NaN10 -> NaN10 765 dqadd7871 add sNaN11 -Inf -> NaN11 Invalid_operation 766 dqadd7872 add sNaN12 -1000 -> NaN12 Invalid_operation 767 dqadd7873 add sNaN13 1000 -> NaN13 Invalid_operation 768 dqadd7874 add sNaN14 NaN17 -> NaN14 Invalid_operation 769 dqadd7875 add sNaN15 sNaN18 -> NaN15 Invalid_operation 770 dqadd7876 add NaN16 sNaN19 -> NaN19 Invalid_operation 771 dqadd7877 add -Inf +sNaN20 -> NaN20 Invalid_operation 772 dqadd7878 add -1000 sNaN21 -> NaN21 Invalid_operation 773 dqadd7879 add 1000 sNaN22 -> NaN22 Invalid_operation 774 dqadd7880 add Inf sNaN23 -> NaN23 Invalid_operation 775 dqadd7881 add +NaN25 +sNaN24 -> NaN24 Invalid_operation 776 dqadd7882 add -NaN26 NaN28 -> -NaN26 777 dqadd7883 add -sNaN27 sNaN29 -> -NaN27 Invalid_operation 778 dqadd7884 add 1000 -NaN30 -> -NaN30 779 dqadd7885 add 1000 -sNaN31 -> -NaN31 Invalid_operation 780 781 -- Here we explore near the boundary of rounding a subnormal to Nmin 782 dqadd7575 add 1E-6143 -1E-6176 -> 9.99999999999999999999999999999999E-6144 Subnormal 783 dqadd7576 add -1E-6143 +1E-6176 -> -9.99999999999999999999999999999999E-6144 Subnormal 784 785 -- check overflow edge case 786 -- 1234567890123456 787 dqadd7972 apply 9.999999999999999999999999999999999E+6144 -> 9.999999999999999999999999999999999E+6144 788 dqadd7973 add 9.999999999999999999999999999999999E+6144 1 -> 9.999999999999999999999999999999999E+6144 Inexact Rounded 789 dqadd7974 add 9999999999999999999999999999999999E+6111 1 -> 9.999999999999999999999999999999999E+6144 Inexact Rounded 790 dqadd7975 add 9999999999999999999999999999999999E+6111 1E+6111 -> Infinity Overflow Inexact Rounded 791 dqadd7976 add 9999999999999999999999999999999999E+6111 9E+6110 -> Infinity Overflow Inexact Rounded 792 dqadd7977 add 9999999999999999999999999999999999E+6111 8E+6110 -> Infinity Overflow Inexact Rounded 793 dqadd7978 add 9999999999999999999999999999999999E+6111 7E+6110 -> Infinity Overflow Inexact Rounded 794 dqadd7979 add 9999999999999999999999999999999999E+6111 6E+6110 -> Infinity Overflow Inexact Rounded 795 dqadd7980 add 9999999999999999999999999999999999E+6111 5E+6110 -> Infinity Overflow Inexact Rounded 796 dqadd7981 add 9999999999999999999999999999999999E+6111 4E+6110 -> 9.999999999999999999999999999999999E+6144 Inexact Rounded 797 dqadd7982 add 9999999999999999999999999999999999E+6111 3E+6110 -> 9.999999999999999999999999999999999E+6144 Inexact Rounded 798 dqadd7983 add 9999999999999999999999999999999999E+6111 2E+6110 -> 9.999999999999999999999999999999999E+6144 Inexact Rounded 799 dqadd7984 add 9999999999999999999999999999999999E+6111 1E+6110 -> 9.999999999999999999999999999999999E+6144 Inexact Rounded 800 801 dqadd7985 apply -9.999999999999999999999999999999999E+6144 -> -9.999999999999999999999999999999999E+6144 802 dqadd7986 add -9.999999999999999999999999999999999E+6144 -1 -> -9.999999999999999999999999999999999E+6144 Inexact Rounded 803 dqadd7987 add -9999999999999999999999999999999999E+6111 -1 -> -9.999999999999999999999999999999999E+6144 Inexact Rounded 804 dqadd7988 add -9999999999999999999999999999999999E+6111 -1E+6111 -> -Infinity Overflow Inexact Rounded 805 dqadd7989 add -9999999999999999999999999999999999E+6111 -9E+6110 -> -Infinity Overflow Inexact Rounded 806 dqadd7990 add -9999999999999999999999999999999999E+6111 -8E+6110 -> -Infinity Overflow Inexact Rounded 807 dqadd7991 add -9999999999999999999999999999999999E+6111 -7E+6110 -> -Infinity Overflow Inexact Rounded 808 dqadd7992 add -9999999999999999999999999999999999E+6111 -6E+6110 -> -Infinity Overflow Inexact Rounded 809 dqadd7993 add -9999999999999999999999999999999999E+6111 -5E+6110 -> -Infinity Overflow Inexact Rounded 810 dqadd7994 add -9999999999999999999999999999999999E+6111 -4E+6110 -> -9.999999999999999999999999999999999E+6144 Inexact Rounded 811 dqadd7995 add -9999999999999999999999999999999999E+6111 -3E+6110 -> -9.999999999999999999999999999999999E+6144 Inexact Rounded 812 dqadd7996 add -9999999999999999999999999999999999E+6111 -2E+6110 -> -9.999999999999999999999999999999999E+6144 Inexact Rounded 813 dqadd7997 add -9999999999999999999999999999999999E+6111 -1E+6110 -> -9.999999999999999999999999999999999E+6144 Inexact Rounded 814 815 -- And for round down full and subnormal results 816 rounding: down 817 dqadd71100 add 1e+2 -1e-6143 -> 99.99999999999999999999999999999999 Rounded Inexact 818 dqadd71101 add 1e+1 -1e-6143 -> 9.999999999999999999999999999999999 Rounded Inexact 819 dqadd71103 add +1 -1e-6143 -> 0.9999999999999999999999999999999999 Rounded Inexact 820 dqadd71104 add 1e-1 -1e-6143 -> 0.09999999999999999999999999999999999 Rounded Inexact 821 dqadd71105 add 1e-2 -1e-6143 -> 0.009999999999999999999999999999999999 Rounded Inexact 822 dqadd71106 add 1e-3 -1e-6143 -> 0.0009999999999999999999999999999999999 Rounded Inexact 823 dqadd71107 add 1e-4 -1e-6143 -> 0.00009999999999999999999999999999999999 Rounded Inexact 824 dqadd71108 add 1e-5 -1e-6143 -> 0.000009999999999999999999999999999999999 Rounded Inexact 825 dqadd71109 add 1e-6 -1e-6143 -> 9.999999999999999999999999999999999E-7 Rounded Inexact 826 827 rounding: ceiling 828 dqadd71110 add -1e+2 +1e-6143 -> -99.99999999999999999999999999999999 Rounded Inexact 829 dqadd71111 add -1e+1 +1e-6143 -> -9.999999999999999999999999999999999 Rounded Inexact 830 dqadd71113 add -1 +1e-6143 -> -0.9999999999999999999999999999999999 Rounded Inexact 831 dqadd71114 add -1e-1 +1e-6143 -> -0.09999999999999999999999999999999999 Rounded Inexact 832 dqadd71115 add -1e-2 +1e-6143 -> -0.009999999999999999999999999999999999 Rounded Inexact 833 dqadd71116 add -1e-3 +1e-6143 -> -0.0009999999999999999999999999999999999 Rounded Inexact 834 dqadd71117 add -1e-4 +1e-6143 -> -0.00009999999999999999999999999999999999 Rounded Inexact 835 dqadd71118 add -1e-5 +1e-6143 -> -0.000009999999999999999999999999999999999 Rounded Inexact 836 dqadd71119 add -1e-6 +1e-6143 -> -9.999999999999999999999999999999999E-7 Rounded Inexact 837 838 -- tests based on Gunnar Degnbol's edge case 839 rounding: half_even 840 841 dqadd71300 add 1E34 -0.5 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 842 dqadd71310 add 1E34 -0.51 -> 9999999999999999999999999999999999 Inexact Rounded 843 dqadd71311 add 1E34 -0.501 -> 9999999999999999999999999999999999 Inexact Rounded 844 dqadd71312 add 1E34 -0.5001 -> 9999999999999999999999999999999999 Inexact Rounded 845 dqadd71313 add 1E34 -0.50001 -> 9999999999999999999999999999999999 Inexact Rounded 846 dqadd71314 add 1E34 -0.500001 -> 9999999999999999999999999999999999 Inexact Rounded 847 dqadd71315 add 1E34 -0.5000001 -> 9999999999999999999999999999999999 Inexact Rounded 848 dqadd71316 add 1E34 -0.50000001 -> 9999999999999999999999999999999999 Inexact Rounded 849 dqadd71317 add 1E34 -0.500000001 -> 9999999999999999999999999999999999 Inexact Rounded 850 dqadd71318 add 1E34 -0.5000000001 -> 9999999999999999999999999999999999 Inexact Rounded 851 dqadd71319 add 1E34 -0.50000000001 -> 9999999999999999999999999999999999 Inexact Rounded 852 dqadd71320 add 1E34 -0.500000000001 -> 9999999999999999999999999999999999 Inexact Rounded 853 dqadd71321 add 1E34 -0.5000000000001 -> 9999999999999999999999999999999999 Inexact Rounded 854 dqadd71322 add 1E34 -0.50000000000001 -> 9999999999999999999999999999999999 Inexact Rounded 855 dqadd71323 add 1E34 -0.500000000000001 -> 9999999999999999999999999999999999 Inexact Rounded 856 dqadd71324 add 1E34 -0.5000000000000001 -> 9999999999999999999999999999999999 Inexact Rounded 857 dqadd71325 add 1E34 -0.5000000000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 858 dqadd71326 add 1E34 -0.500000000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 859 dqadd71327 add 1E34 -0.50000000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 860 dqadd71328 add 1E34 -0.5000000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 861 dqadd71329 add 1E34 -0.500000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 862 dqadd71330 add 1E34 -0.50000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 863 dqadd71331 add 1E34 -0.5000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 864 dqadd71332 add 1E34 -0.500000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 865 dqadd71333 add 1E34 -0.50000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 866 dqadd71334 add 1E34 -0.5000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 867 dqadd71335 add 1E34 -0.500000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 868 dqadd71336 add 1E34 -0.50000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 869 dqadd71337 add 1E34 -0.5000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 870 dqadd71338 add 1E34 -0.500 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 871 dqadd71339 add 1E34 -0.50 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 872 873 dqadd71340 add 1E34 -5000000.000010001 -> 9999999999999999999999999995000000 Inexact Rounded 874 dqadd71341 add 1E34 -5000000.000000001 -> 9999999999999999999999999995000000 Inexact Rounded 875 876 dqadd71349 add 9999999999999999999999999999999999 0.4 -> 9999999999999999999999999999999999 Inexact Rounded 877 dqadd71350 add 9999999999999999999999999999999999 0.49 -> 9999999999999999999999999999999999 Inexact Rounded 878 dqadd71351 add 9999999999999999999999999999999999 0.499 -> 9999999999999999999999999999999999 Inexact Rounded 879 dqadd71352 add 9999999999999999999999999999999999 0.4999 -> 9999999999999999999999999999999999 Inexact Rounded 880 dqadd71353 add 9999999999999999999999999999999999 0.49999 -> 9999999999999999999999999999999999 Inexact Rounded 881 dqadd71354 add 9999999999999999999999999999999999 0.499999 -> 9999999999999999999999999999999999 Inexact Rounded 882 dqadd71355 add 9999999999999999999999999999999999 0.4999999 -> 9999999999999999999999999999999999 Inexact Rounded 883 dqadd71356 add 9999999999999999999999999999999999 0.49999999 -> 9999999999999999999999999999999999 Inexact Rounded 884 dqadd71357 add 9999999999999999999999999999999999 0.499999999 -> 9999999999999999999999999999999999 Inexact Rounded 885 dqadd71358 add 9999999999999999999999999999999999 0.4999999999 -> 9999999999999999999999999999999999 Inexact Rounded 886 dqadd71359 add 9999999999999999999999999999999999 0.49999999999 -> 9999999999999999999999999999999999 Inexact Rounded 887 dqadd71360 add 9999999999999999999999999999999999 0.499999999999 -> 9999999999999999999999999999999999 Inexact Rounded 888 dqadd71361 add 9999999999999999999999999999999999 0.4999999999999 -> 9999999999999999999999999999999999 Inexact Rounded 889 dqadd71362 add 9999999999999999999999999999999999 0.49999999999999 -> 9999999999999999999999999999999999 Inexact Rounded 890 dqadd71363 add 9999999999999999999999999999999999 0.499999999999999 -> 9999999999999999999999999999999999 Inexact Rounded 891 dqadd71364 add 9999999999999999999999999999999999 0.4999999999999999 -> 9999999999999999999999999999999999 Inexact Rounded 892 dqadd71365 add 9999999999999999999999999999999999 0.5000000000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 893 dqadd71367 add 9999999999999999999999999999999999 0.500000000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 894 dqadd71368 add 9999999999999999999999999999999999 0.50000000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 895 dqadd71369 add 9999999999999999999999999999999999 0.5000000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 896 dqadd71370 add 9999999999999999999999999999999999 0.500000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 897 dqadd71371 add 9999999999999999999999999999999999 0.50000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 898 dqadd71372 add 9999999999999999999999999999999999 0.5000000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 899 dqadd71373 add 9999999999999999999999999999999999 0.500000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 900 dqadd71374 add 9999999999999999999999999999999999 0.50000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 901 dqadd71375 add 9999999999999999999999999999999999 0.5000000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 902 dqadd71376 add 9999999999999999999999999999999999 0.500000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 903 dqadd71377 add 9999999999999999999999999999999999 0.50000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 904 dqadd71378 add 9999999999999999999999999999999999 0.5000 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 905 dqadd71379 add 9999999999999999999999999999999999 0.500 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 906 dqadd71380 add 9999999999999999999999999999999999 0.50 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 907 dqadd71381 add 9999999999999999999999999999999999 0.5 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 908 dqadd71382 add 9999999999999999999999999999999999 0.5000000000000001 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 909 dqadd71383 add 9999999999999999999999999999999999 0.500000000000001 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 910 dqadd71384 add 9999999999999999999999999999999999 0.50000000000001 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 911 dqadd71385 add 9999999999999999999999999999999999 0.5000000000001 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 912 dqadd71386 add 9999999999999999999999999999999999 0.500000000001 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 913 dqadd71387 add 9999999999999999999999999999999999 0.50000000001 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 914 dqadd71388 add 9999999999999999999999999999999999 0.5000000001 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 915 dqadd71389 add 9999999999999999999999999999999999 0.500000001 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 916 dqadd71390 add 9999999999999999999999999999999999 0.50000001 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 917 dqadd71391 add 9999999999999999999999999999999999 0.5000001 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 918 dqadd71392 add 9999999999999999999999999999999999 0.500001 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 919 dqadd71393 add 9999999999999999999999999999999999 0.50001 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 920 dqadd71394 add 9999999999999999999999999999999999 0.5001 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 921 dqadd71395 add 9999999999999999999999999999999999 0.501 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 922 dqadd71396 add 9999999999999999999999999999999999 0.51 -> 1.000000000000000000000000000000000E+34 Inexact Rounded 923 924 -- More GD edge cases, where difference between the unadjusted 925 -- exponents is larger than the maximum precision and one side is 0 926 dqadd71420 add 0 1.123456789987654321123456789012345 -> 1.123456789987654321123456789012345 927 dqadd71421 add 0 1.123456789987654321123456789012345E-1 -> 0.1123456789987654321123456789012345 928 dqadd71422 add 0 1.123456789987654321123456789012345E-2 -> 0.01123456789987654321123456789012345 929 dqadd71423 add 0 1.123456789987654321123456789012345E-3 -> 0.001123456789987654321123456789012345 930 dqadd71424 add 0 1.123456789987654321123456789012345E-4 -> 0.0001123456789987654321123456789012345 931 dqadd71425 add 0 1.123456789987654321123456789012345E-5 -> 0.00001123456789987654321123456789012345 932 dqadd71426 add 0 1.123456789987654321123456789012345E-6 -> 0.000001123456789987654321123456789012345 933 dqadd71427 add 0 1.123456789987654321123456789012345E-7 -> 1.123456789987654321123456789012345E-7 934 dqadd71428 add 0 1.123456789987654321123456789012345E-8 -> 1.123456789987654321123456789012345E-8 935 dqadd71429 add 0 1.123456789987654321123456789012345E-9 -> 1.123456789987654321123456789012345E-9 936 dqadd71430 add 0 1.123456789987654321123456789012345E-10 -> 1.123456789987654321123456789012345E-10 937 dqadd71431 add 0 1.123456789987654321123456789012345E-11 -> 1.123456789987654321123456789012345E-11 938 dqadd71432 add 0 1.123456789987654321123456789012345E-12 -> 1.123456789987654321123456789012345E-12 939 dqadd71433 add 0 1.123456789987654321123456789012345E-13 -> 1.123456789987654321123456789012345E-13 940 dqadd71434 add 0 1.123456789987654321123456789012345E-14 -> 1.123456789987654321123456789012345E-14 941 dqadd71435 add 0 1.123456789987654321123456789012345E-15 -> 1.123456789987654321123456789012345E-15 942 dqadd71436 add 0 1.123456789987654321123456789012345E-16 -> 1.123456789987654321123456789012345E-16 943 dqadd71437 add 0 1.123456789987654321123456789012345E-17 -> 1.123456789987654321123456789012345E-17 944 dqadd71438 add 0 1.123456789987654321123456789012345E-18 -> 1.123456789987654321123456789012345E-18 945 dqadd71439 add 0 1.123456789987654321123456789012345E-19 -> 1.123456789987654321123456789012345E-19 946 dqadd71440 add 0 1.123456789987654321123456789012345E-20 -> 1.123456789987654321123456789012345E-20 947 dqadd71441 add 0 1.123456789987654321123456789012345E-21 -> 1.123456789987654321123456789012345E-21 948 dqadd71442 add 0 1.123456789987654321123456789012345E-22 -> 1.123456789987654321123456789012345E-22 949 dqadd71443 add 0 1.123456789987654321123456789012345E-23 -> 1.123456789987654321123456789012345E-23 950 dqadd71444 add 0 1.123456789987654321123456789012345E-24 -> 1.123456789987654321123456789012345E-24 951 dqadd71445 add 0 1.123456789987654321123456789012345E-25 -> 1.123456789987654321123456789012345E-25 952 dqadd71446 add 0 1.123456789987654321123456789012345E-26 -> 1.123456789987654321123456789012345E-26 953 dqadd71447 add 0 1.123456789987654321123456789012345E-27 -> 1.123456789987654321123456789012345E-27 954 dqadd71448 add 0 1.123456789987654321123456789012345E-28 -> 1.123456789987654321123456789012345E-28 955 dqadd71449 add 0 1.123456789987654321123456789012345E-29 -> 1.123456789987654321123456789012345E-29 956 dqadd71450 add 0 1.123456789987654321123456789012345E-30 -> 1.123456789987654321123456789012345E-30 957 dqadd71451 add 0 1.123456789987654321123456789012345E-31 -> 1.123456789987654321123456789012345E-31 958 dqadd71452 add 0 1.123456789987654321123456789012345E-32 -> 1.123456789987654321123456789012345E-32 959 dqadd71453 add 0 1.123456789987654321123456789012345E-33 -> 1.123456789987654321123456789012345E-33 960 dqadd71454 add 0 1.123456789987654321123456789012345E-34 -> 1.123456789987654321123456789012345E-34 961 dqadd71455 add 0 1.123456789987654321123456789012345E-35 -> 1.123456789987654321123456789012345E-35 962 dqadd71456 add 0 1.123456789987654321123456789012345E-36 -> 1.123456789987654321123456789012345E-36 963 964 -- same, reversed 0 965 dqadd71460 add 1.123456789987654321123456789012345 0 -> 1.123456789987654321123456789012345 966 dqadd71461 add 1.123456789987654321123456789012345E-1 0 -> 0.1123456789987654321123456789012345 967 dqadd71462 add 1.123456789987654321123456789012345E-2 0 -> 0.01123456789987654321123456789012345 968 dqadd71463 add 1.123456789987654321123456789012345E-3 0 -> 0.001123456789987654321123456789012345 969 dqadd71464 add 1.123456789987654321123456789012345E-4 0 -> 0.0001123456789987654321123456789012345 970 dqadd71465 add 1.123456789987654321123456789012345E-5 0 -> 0.00001123456789987654321123456789012345 971 dqadd71466 add 1.123456789987654321123456789012345E-6 0 -> 0.000001123456789987654321123456789012345 972 dqadd71467 add 1.123456789987654321123456789012345E-7 0 -> 1.123456789987654321123456789012345E-7 973 dqadd71468 add 1.123456789987654321123456789012345E-8 0 -> 1.123456789987654321123456789012345E-8 974 dqadd71469 add 1.123456789987654321123456789012345E-9 0 -> 1.123456789987654321123456789012345E-9 975 dqadd71470 add 1.123456789987654321123456789012345E-10 0 -> 1.123456789987654321123456789012345E-10 976 dqadd71471 add 1.123456789987654321123456789012345E-11 0 -> 1.123456789987654321123456789012345E-11 977 dqadd71472 add 1.123456789987654321123456789012345E-12 0 -> 1.123456789987654321123456789012345E-12 978 dqadd71473 add 1.123456789987654321123456789012345E-13 0 -> 1.123456789987654321123456789012345E-13 979 dqadd71474 add 1.123456789987654321123456789012345E-14 0 -> 1.123456789987654321123456789012345E-14 980 dqadd71475 add 1.123456789987654321123456789012345E-15 0 -> 1.123456789987654321123456789012345E-15 981 dqadd71476 add 1.123456789987654321123456789012345E-16 0 -> 1.123456789987654321123456789012345E-16 982 dqadd71477 add 1.123456789987654321123456789012345E-17 0 -> 1.123456789987654321123456789012345E-17 983 dqadd71478 add 1.123456789987654321123456789012345E-18 0 -> 1.123456789987654321123456789012345E-18 984 dqadd71479 add 1.123456789987654321123456789012345E-19 0 -> 1.123456789987654321123456789012345E-19 985 dqadd71480 add 1.123456789987654321123456789012345E-20 0 -> 1.123456789987654321123456789012345E-20 986 dqadd71481 add 1.123456789987654321123456789012345E-21 0 -> 1.123456789987654321123456789012345E-21 987 dqadd71482 add 1.123456789987654321123456789012345E-22 0 -> 1.123456789987654321123456789012345E-22 988 dqadd71483 add 1.123456789987654321123456789012345E-23 0 -> 1.123456789987654321123456789012345E-23 989 dqadd71484 add 1.123456789987654321123456789012345E-24 0 -> 1.123456789987654321123456789012345E-24 990 dqadd71485 add 1.123456789987654321123456789012345E-25 0 -> 1.123456789987654321123456789012345E-25 991 dqadd71486 add 1.123456789987654321123456789012345E-26 0 -> 1.123456789987654321123456789012345E-26 992 dqadd71487 add 1.123456789987654321123456789012345E-27 0 -> 1.123456789987654321123456789012345E-27 993 dqadd71488 add 1.123456789987654321123456789012345E-28 0 -> 1.123456789987654321123456789012345E-28 994 dqadd71489 add 1.123456789987654321123456789012345E-29 0 -> 1.123456789987654321123456789012345E-29 995 dqadd71490 add 1.123456789987654321123456789012345E-30 0 -> 1.123456789987654321123456789012345E-30 996 dqadd71491 add 1.123456789987654321123456789012345E-31 0 -> 1.123456789987654321123456789012345E-31 997 dqadd71492 add 1.123456789987654321123456789012345E-32 0 -> 1.123456789987654321123456789012345E-32 998 dqadd71493 add 1.123456789987654321123456789012345E-33 0 -> 1.123456789987654321123456789012345E-33 999 dqadd71494 add 1.123456789987654321123456789012345E-34 0 -> 1.123456789987654321123456789012345E-34 1000 dqadd71495 add 1.123456789987654321123456789012345E-35 0 -> 1.123456789987654321123456789012345E-35 1001 dqadd71496 add 1.123456789987654321123456789012345E-36 0 -> 1.123456789987654321123456789012345E-36 1002 1003 -- same, Es on the 0 1004 dqadd71500 add 1.123456789987654321123456789012345 0E-0 -> 1.123456789987654321123456789012345 1005 dqadd71501 add 1.123456789987654321123456789012345 0E-1 -> 1.123456789987654321123456789012345 1006 dqadd71502 add 1.123456789987654321123456789012345 0E-2 -> 1.123456789987654321123456789012345 1007 dqadd71503 add 1.123456789987654321123456789012345 0E-3 -> 1.123456789987654321123456789012345 1008 dqadd71504 add 1.123456789987654321123456789012345 0E-4 -> 1.123456789987654321123456789012345 1009 dqadd71505 add 1.123456789987654321123456789012345 0E-5 -> 1.123456789987654321123456789012345 1010 dqadd71506 add 1.123456789987654321123456789012345 0E-6 -> 1.123456789987654321123456789012345 1011 dqadd71507 add 1.123456789987654321123456789012345 0E-7 -> 1.123456789987654321123456789012345 1012 dqadd71508 add 1.123456789987654321123456789012345 0E-8 -> 1.123456789987654321123456789012345 1013 dqadd71509 add 1.123456789987654321123456789012345 0E-9 -> 1.123456789987654321123456789012345 1014 dqadd71510 add 1.123456789987654321123456789012345 0E-10 -> 1.123456789987654321123456789012345 1015 dqadd71511 add 1.123456789987654321123456789012345 0E-11 -> 1.123456789987654321123456789012345 1016 dqadd71512 add 1.123456789987654321123456789012345 0E-12 -> 1.123456789987654321123456789012345 1017 dqadd71513 add 1.123456789987654321123456789012345 0E-13 -> 1.123456789987654321123456789012345 1018 dqadd71514 add 1.123456789987654321123456789012345 0E-14 -> 1.123456789987654321123456789012345 1019 dqadd71515 add 1.123456789987654321123456789012345 0E-15 -> 1.123456789987654321123456789012345 1020 dqadd71516 add 1.123456789987654321123456789012345 0E-16 -> 1.123456789987654321123456789012345 1021 dqadd71517 add 1.123456789987654321123456789012345 0E-17 -> 1.123456789987654321123456789012345 1022 dqadd71518 add 1.123456789987654321123456789012345 0E-18 -> 1.123456789987654321123456789012345 1023 dqadd71519 add 1.123456789987654321123456789012345 0E-19 -> 1.123456789987654321123456789012345 1024 dqadd71520 add 1.123456789987654321123456789012345 0E-20 -> 1.123456789987654321123456789012345 1025 dqadd71521 add 1.123456789987654321123456789012345 0E-21 -> 1.123456789987654321123456789012345 1026 dqadd71522 add 1.123456789987654321123456789012345 0E-22 -> 1.123456789987654321123456789012345 1027 dqadd71523 add 1.123456789987654321123456789012345 0E-23 -> 1.123456789987654321123456789012345 1028 dqadd71524 add 1.123456789987654321123456789012345 0E-24 -> 1.123456789987654321123456789012345 1029 dqadd71525 add 1.123456789987654321123456789012345 0E-25 -> 1.123456789987654321123456789012345 1030 dqadd71526 add 1.123456789987654321123456789012345 0E-26 -> 1.123456789987654321123456789012345 1031 dqadd71527 add 1.123456789987654321123456789012345 0E-27 -> 1.123456789987654321123456789012345 1032 dqadd71528 add 1.123456789987654321123456789012345 0E-28 -> 1.123456789987654321123456789012345 1033 dqadd71529 add 1.123456789987654321123456789012345 0E-29 -> 1.123456789987654321123456789012345 1034 dqadd71530 add 1.123456789987654321123456789012345 0E-30 -> 1.123456789987654321123456789012345 1035 dqadd71531 add 1.123456789987654321123456789012345 0E-31 -> 1.123456789987654321123456789012345 1036 dqadd71532 add 1.123456789987654321123456789012345 0E-32 -> 1.123456789987654321123456789012345 1037 dqadd71533 add 1.123456789987654321123456789012345 0E-33 -> 1.123456789987654321123456789012345 1038 -- next four flag Rounded because the 0 extends the result 1039 dqadd71534 add 1.123456789987654321123456789012345 0E-34 -> 1.123456789987654321123456789012345 Rounded 1040 dqadd71535 add 1.123456789987654321123456789012345 0E-35 -> 1.123456789987654321123456789012345 Rounded 1041 dqadd71536 add 1.123456789987654321123456789012345 0E-36 -> 1.123456789987654321123456789012345 Rounded 1042 dqadd71537 add 1.123456789987654321123456789012345 0E-37 -> 1.123456789987654321123456789012345 Rounded 1043 1044 -- sum of two opposite-sign operands is exactly 0 and floor => -0 1045 rounding: half_up 1046 -- exact zeros from zeros 1047 dqadd71600 add 0 0E-19 -> 0E-19 1048 dqadd71601 add -0 0E-19 -> 0E-19 1049 dqadd71602 add 0 -0E-19 -> 0E-19 1050 dqadd71603 add -0 -0E-19 -> -0E-19 1051 -- exact zeros from non-zeros 1052 dqadd71611 add -11 11 -> 0 1053 dqadd71612 add 11 -11 -> 0 1054 1055 rounding: half_down 1056 -- exact zeros from zeros 1057 dqadd71620 add 0 0E-19 -> 0E-19 1058 dqadd71621 add -0 0E-19 -> 0E-19 1059 dqadd71622 add 0 -0E-19 -> 0E-19 1060 dqadd71623 add -0 -0E-19 -> -0E-19 1061 -- exact zeros from non-zeros 1062 dqadd71631 add -11 11 -> 0 1063 dqadd71632 add 11 -11 -> 0 1064 1065 rounding: half_even 1066 -- exact zeros from zeros 1067 dqadd71640 add 0 0E-19 -> 0E-19 1068 dqadd71641 add -0 0E-19 -> 0E-19 1069 dqadd71642 add 0 -0E-19 -> 0E-19 1070 dqadd71643 add -0 -0E-19 -> -0E-19 1071 -- exact zeros from non-zeros 1072 dqadd71651 add -11 11 -> 0 1073 dqadd71652 add 11 -11 -> 0 1074 1075 rounding: up 1076 -- exact zeros from zeros 1077 dqadd71660 add 0 0E-19 -> 0E-19 1078 dqadd71661 add -0 0E-19 -> 0E-19 1079 dqadd71662 add 0 -0E-19 -> 0E-19 1080 dqadd71663 add -0 -0E-19 -> -0E-19 1081 -- exact zeros from non-zeros 1082 dqadd71671 add -11 11 -> 0 1083 dqadd71672 add 11 -11 -> 0 1084 1085 rounding: down 1086 -- exact zeros from zeros 1087 dqadd71680 add 0 0E-19 -> 0E-19 1088 dqadd71681 add -0 0E-19 -> 0E-19 1089 dqadd71682 add 0 -0E-19 -> 0E-19 1090 dqadd71683 add -0 -0E-19 -> -0E-19 1091 -- exact zeros from non-zeros 1092 dqadd71691 add -11 11 -> 0 1093 dqadd71692 add 11 -11 -> 0 1094 1095 rounding: ceiling 1096 -- exact zeros from zeros 1097 dqadd71700 add 0 0E-19 -> 0E-19 1098 dqadd71701 add -0 0E-19 -> 0E-19 1099 dqadd71702 add 0 -0E-19 -> 0E-19 1100 dqadd71703 add -0 -0E-19 -> -0E-19 1101 -- exact zeros from non-zeros 1102 dqadd71711 add -11 11 -> 0 1103 dqadd71712 add 11 -11 -> 0 1104 1105 -- and the extra-special ugly case; unusual minuses marked by -- * 1106 rounding: floor 1107 -- exact zeros from zeros 1108 dqadd71720 add 0 0E-19 -> 0E-19 1109 dqadd71721 add -0 0E-19 -> -0E-19 -- * 1110 dqadd71722 add 0 -0E-19 -> -0E-19 -- * 1111 dqadd71723 add -0 -0E-19 -> -0E-19 1112 -- exact zeros from non-zeros 1113 dqadd71731 add -11 11 -> -0 -- * 1114 dqadd71732 add 11 -11 -> -0 -- * 1115 1116 -- Examples from SQL proposal (Krishna Kulkarni) 1117 dqadd71741 add 130E-2 120E-2 -> 2.50 1118 dqadd71742 add 130E-2 12E-1 -> 2.50 1119 dqadd71743 add 130E-2 1E0 -> 2.30 1120 dqadd71744 add 1E2 1E4 -> 1.01E+4 1121 dqadd71745 add 130E-2 -120E-2 -> 0.10 1122 dqadd71746 add 130E-2 -12E-1 -> 0.10 1123 dqadd71747 add 130E-2 -1E0 -> 0.30 1124 dqadd71748 add 1E2 -1E4 -> -9.9E+3 1125 1126 -- Gappy coefficients; check residue handling even with full coefficient gap 1127 rounding: half_even 1128 1129 dqadd75001 add 1239876543211234567894567890123456 1 -> 1239876543211234567894567890123457 1130 dqadd75002 add 1239876543211234567894567890123456 0.6 -> 1239876543211234567894567890123457 Inexact Rounded 1131 dqadd75003 add 1239876543211234567894567890123456 0.06 -> 1239876543211234567894567890123456 Inexact Rounded 1132 dqadd75004 add 1239876543211234567894567890123456 6E-3 -> 1239876543211234567894567890123456 Inexact Rounded 1133 dqadd75005 add 1239876543211234567894567890123456 6E-4 -> 1239876543211234567894567890123456 Inexact Rounded 1134 dqadd75006 add 1239876543211234567894567890123456 6E-5 -> 1239876543211234567894567890123456 Inexact Rounded 1135 dqadd75007 add 1239876543211234567894567890123456 6E-6 -> 1239876543211234567894567890123456 Inexact Rounded 1136 dqadd75008 add 1239876543211234567894567890123456 6E-7 -> 1239876543211234567894567890123456 Inexact Rounded 1137 dqadd75009 add 1239876543211234567894567890123456 6E-8 -> 1239876543211234567894567890123456 Inexact Rounded 1138 dqadd75010 add 1239876543211234567894567890123456 6E-9 -> 1239876543211234567894567890123456 Inexact Rounded 1139 dqadd75011 add 1239876543211234567894567890123456 6E-10 -> 1239876543211234567894567890123456 Inexact Rounded 1140 dqadd75012 add 1239876543211234567894567890123456 6E-11 -> 1239876543211234567894567890123456 Inexact Rounded 1141 dqadd75013 add 1239876543211234567894567890123456 6E-12 -> 1239876543211234567894567890123456 Inexact Rounded 1142 dqadd75014 add 1239876543211234567894567890123456 6E-13 -> 1239876543211234567894567890123456 Inexact Rounded 1143 dqadd75015 add 1239876543211234567894567890123456 6E-14 -> 1239876543211234567894567890123456 Inexact Rounded 1144 dqadd75016 add 1239876543211234567894567890123456 6E-15 -> 1239876543211234567894567890123456 Inexact Rounded 1145 dqadd75017 add 1239876543211234567894567890123456 6E-16 -> 1239876543211234567894567890123456 Inexact Rounded 1146 dqadd75018 add 1239876543211234567894567890123456 6E-17 -> 1239876543211234567894567890123456 Inexact Rounded 1147 dqadd75019 add 1239876543211234567894567890123456 6E-18 -> 1239876543211234567894567890123456 Inexact Rounded 1148 dqadd75020 add 1239876543211234567894567890123456 6E-19 -> 1239876543211234567894567890123456 Inexact Rounded 1149 dqadd75021 add 1239876543211234567894567890123456 6E-20 -> 1239876543211234567894567890123456 Inexact Rounded 1150 1151 -- widening second argument at gap 1152 dqadd75030 add 12398765432112345678945678 1 -> 12398765432112345678945679 1153 dqadd75031 add 12398765432112345678945678 0.1 -> 12398765432112345678945678.1 1154 dqadd75032 add 12398765432112345678945678 0.12 -> 12398765432112345678945678.12 1155 dqadd75033 add 12398765432112345678945678 0.123 -> 12398765432112345678945678.123 1156 dqadd75034 add 12398765432112345678945678 0.1234 -> 12398765432112345678945678.1234 1157 dqadd75035 add 12398765432112345678945678 0.12345 -> 12398765432112345678945678.12345 1158 dqadd75036 add 12398765432112345678945678 0.123456 -> 12398765432112345678945678.123456 1159 dqadd75037 add 12398765432112345678945678 0.1234567 -> 12398765432112345678945678.1234567 1160 dqadd75038 add 12398765432112345678945678 0.12345678 -> 12398765432112345678945678.12345678 1161 dqadd75039 add 12398765432112345678945678 0.123456789 -> 12398765432112345678945678.12345679 Inexact Rounded 1162 dqadd75040 add 12398765432112345678945678 0.123456785 -> 12398765432112345678945678.12345678 Inexact Rounded 1163 dqadd75041 add 12398765432112345678945678 0.1234567850 -> 12398765432112345678945678.12345678 Inexact Rounded 1164 dqadd75042 add 12398765432112345678945678 0.1234567851 -> 12398765432112345678945678.12345679 Inexact Rounded 1165 dqadd75043 add 12398765432112345678945678 0.12345678501 -> 12398765432112345678945678.12345679 Inexact Rounded 1166 dqadd75044 add 12398765432112345678945678 0.123456785001 -> 12398765432112345678945678.12345679 Inexact Rounded 1167 dqadd75045 add 12398765432112345678945678 0.1234567850001 -> 12398765432112345678945678.12345679 Inexact Rounded 1168 dqadd75046 add 12398765432112345678945678 0.12345678500001 -> 12398765432112345678945678.12345679 Inexact Rounded 1169 dqadd75047 add 12398765432112345678945678 0.123456785000001 -> 12398765432112345678945678.12345679 Inexact Rounded 1170 dqadd75048 add 12398765432112345678945678 0.1234567850000001 -> 12398765432112345678945678.12345679 Inexact Rounded 1171 dqadd75049 add 12398765432112345678945678 0.1234567850000000 -> 12398765432112345678945678.12345678 Inexact Rounded 1172 -- 90123456 1173 rounding: half_even 1174 dqadd75050 add 12398765432112345678945678 0.0234567750000000 -> 12398765432112345678945678.02345678 Inexact Rounded 1175 dqadd75051 add 12398765432112345678945678 0.0034567750000000 -> 12398765432112345678945678.00345678 Inexact Rounded 1176 dqadd75052 add 12398765432112345678945678 0.0004567750000000 -> 12398765432112345678945678.00045678 Inexact Rounded 1177 dqadd75053 add 12398765432112345678945678 0.0000567750000000 -> 12398765432112345678945678.00005678 Inexact Rounded 1178 dqadd75054 add 12398765432112345678945678 0.0000067750000000 -> 12398765432112345678945678.00000678 Inexact Rounded 1179 dqadd75055 add 12398765432112345678945678 0.0000007750000000 -> 12398765432112345678945678.00000078 Inexact Rounded 1180 dqadd75056 add 12398765432112345678945678 0.0000000750000000 -> 12398765432112345678945678.00000008 Inexact Rounded 1181 dqadd75057 add 12398765432112345678945678 0.0000000050000000 -> 12398765432112345678945678.00000000 Inexact Rounded 1182 dqadd75060 add 12398765432112345678945678 0.0234567750000001 -> 12398765432112345678945678.02345678 Inexact Rounded 1183 dqadd75061 add 12398765432112345678945678 0.0034567750000001 -> 12398765432112345678945678.00345678 Inexact Rounded 1184 dqadd75062 add 12398765432112345678945678 0.0004567750000001 -> 12398765432112345678945678.00045678 Inexact Rounded 1185 dqadd75063 add 12398765432112345678945678 0.0000567750000001 -> 12398765432112345678945678.00005678 Inexact Rounded 1186 dqadd75064 add 12398765432112345678945678 0.0000067750000001 -> 12398765432112345678945678.00000678 Inexact Rounded 1187 dqadd75065 add 12398765432112345678945678 0.0000007750000001 -> 12398765432112345678945678.00000078 Inexact Rounded 1188 dqadd75066 add 12398765432112345678945678 0.0000000750000001 -> 12398765432112345678945678.00000008 Inexact Rounded 1189 dqadd75067 add 12398765432112345678945678 0.0000000050000001 -> 12398765432112345678945678.00000001 Inexact Rounded 1190 -- far-out residues (full coefficient gap is 16+15 digits) 1191 rounding: up 1192 dqadd75070 add 12398765432112345678945678 1E-8 -> 12398765432112345678945678.00000001 1193 dqadd75071 add 12398765432112345678945678 1E-9 -> 12398765432112345678945678.00000001 Inexact Rounded 1194 dqadd75072 add 12398765432112345678945678 1E-10 -> 12398765432112345678945678.00000001 Inexact Rounded 1195 dqadd75073 add 12398765432112345678945678 1E-11 -> 12398765432112345678945678.00000001 Inexact Rounded 1196 dqadd75074 add 12398765432112345678945678 1E-12 -> 12398765432112345678945678.00000001 Inexact Rounded 1197 dqadd75075 add 12398765432112345678945678 1E-13 -> 12398765432112345678945678.00000001 Inexact Rounded 1198 dqadd75076 add 12398765432112345678945678 1E-14 -> 12398765432112345678945678.00000001 Inexact Rounded 1199 dqadd75077 add 12398765432112345678945678 1E-15 -> 12398765432112345678945678.00000001 Inexact Rounded 1200 dqadd75078 add 12398765432112345678945678 1E-16 -> 12398765432112345678945678.00000001 Inexact Rounded 1201 dqadd75079 add 12398765432112345678945678 1E-17 -> 12398765432112345678945678.00000001 Inexact Rounded 1202 dqadd75080 add 12398765432112345678945678 1E-18 -> 12398765432112345678945678.00000001 Inexact Rounded 1203 dqadd75081 add 12398765432112345678945678 1E-19 -> 12398765432112345678945678.00000001 Inexact Rounded 1204 dqadd75082 add 12398765432112345678945678 1E-20 -> 12398765432112345678945678.00000001 Inexact Rounded 1205 dqadd75083 add 12398765432112345678945678 1E-25 -> 12398765432112345678945678.00000001 Inexact Rounded 1206 dqadd75084 add 12398765432112345678945678 1E-30 -> 12398765432112345678945678.00000001 Inexact Rounded 1207 dqadd75085 add 12398765432112345678945678 1E-31 -> 12398765432112345678945678.00000001 Inexact Rounded 1208 dqadd75086 add 12398765432112345678945678 1E-32 -> 12398765432112345678945678.00000001 Inexact Rounded 1209 dqadd75087 add 12398765432112345678945678 1E-33 -> 12398765432112345678945678.00000001 Inexact Rounded 1210 dqadd75088 add 12398765432112345678945678 1E-34 -> 12398765432112345678945678.00000001 Inexact Rounded 1211 dqadd75089 add 12398765432112345678945678 1E-35 -> 12398765432112345678945678.00000001 Inexact Rounded 1212 1213 -- Null tests 1214 dqadd9990 add 10 # -> NaN Invalid_operation 1215 dqadd9991 add # 10 -> NaN Invalid_operation 1216