bigint-arithmetic.js (38022B)
1 // Copyright (C) 2017 Robin Templeton. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-addition-operator-plus-runtime-semantics-evaluation 5 description: BigInt addition arithmetic 6 features: [BigInt] 7 ---*/ 8 assert.sameValue( 9 0xFEDCBA9876543210n + 0xFEDCBA9876543210n, 10 0x1FDB97530ECA86420n, 11 'The result of (0xFEDCBA9876543210n + 0xFEDCBA9876543210n) is 0x1FDB97530ECA86420n' 12 ); 13 14 assert.sameValue( 15 0xFEDCBA9876543210n + 0xFEDCBA9876543210n, 16 0x1FDB97530ECA86420n, 17 'The result of (0xFEDCBA9876543210n + 0xFEDCBA9876543210n) is 0x1FDB97530ECA86420n' 18 ); 19 20 assert.sameValue( 21 0xFEDCBA9876543210n + 0xFEDCBA987654320Fn, 22 0x1FDB97530ECA8641Fn, 23 'The result of (0xFEDCBA9876543210n + 0xFEDCBA987654320Fn) is 0x1FDB97530ECA8641Fn' 24 ); 25 26 assert.sameValue( 27 0xFEDCBA9876543210n + 0xFEDCBA987654320Fn, 28 0x1FDB97530ECA8641Fn, 29 'The result of (0xFEDCBA9876543210n + 0xFEDCBA987654320Fn) is 0x1FDB97530ECA8641Fn' 30 ); 31 32 assert.sameValue( 33 0xFEDCBA9876543210n + 0xFEDCBA98n, 34 0xFEDCBA997530ECA8n, 35 'The result of (0xFEDCBA9876543210n + 0xFEDCBA98n) is 0xFEDCBA997530ECA8n' 36 ); 37 38 assert.sameValue( 39 0xFEDCBA9876543210n + 0xFEDCBA98n, 40 0xFEDCBA997530ECA8n, 41 'The result of (0xFEDCBA9876543210n + 0xFEDCBA98n) is 0xFEDCBA997530ECA8n' 42 ); 43 44 assert.sameValue( 45 0xFEDCBA9876543210n + 0xFEDCBA97n, 46 0xFEDCBA997530ECA7n, 47 'The result of (0xFEDCBA9876543210n + 0xFEDCBA97n) is 0xFEDCBA997530ECA7n' 48 ); 49 50 assert.sameValue( 51 0xFEDCBA9876543210n + 0xFEDCBA97n, 52 0xFEDCBA997530ECA7n, 53 'The result of (0xFEDCBA9876543210n + 0xFEDCBA97n) is 0xFEDCBA997530ECA7n' 54 ); 55 56 assert.sameValue( 57 0xFEDCBA9876543210n + 0x1234n, 58 0xFEDCBA9876544444n, 59 'The result of (0xFEDCBA9876543210n + 0x1234n) is 0xFEDCBA9876544444n' 60 ); 61 62 assert.sameValue( 63 0xFEDCBA9876543210n + 0x1234n, 64 0xFEDCBA9876544444n, 65 'The result of (0xFEDCBA9876543210n + 0x1234n) is 0xFEDCBA9876544444n' 66 ); 67 68 assert.sameValue( 69 0xFEDCBA9876543210n + 0x3n, 70 0xFEDCBA9876543213n, 71 'The result of (0xFEDCBA9876543210n + 0x3n) is 0xFEDCBA9876543213n' 72 ); 73 74 assert.sameValue( 75 0xFEDCBA9876543210n + 0x3n, 76 0xFEDCBA9876543213n, 77 'The result of (0xFEDCBA9876543210n + 0x3n) is 0xFEDCBA9876543213n' 78 ); 79 80 assert.sameValue( 81 0xFEDCBA9876543210n + 0x2n, 82 0xFEDCBA9876543212n, 83 'The result of (0xFEDCBA9876543210n + 0x2n) is 0xFEDCBA9876543212n' 84 ); 85 86 assert.sameValue( 87 0xFEDCBA9876543210n + 0x2n, 88 0xFEDCBA9876543212n, 89 'The result of (0xFEDCBA9876543210n + 0x2n) is 0xFEDCBA9876543212n' 90 ); 91 92 assert.sameValue( 93 0xFEDCBA9876543210n + 0x1n, 94 0xFEDCBA9876543211n, 95 'The result of (0xFEDCBA9876543210n + 0x1n) is 0xFEDCBA9876543211n' 96 ); 97 98 assert.sameValue( 99 0xFEDCBA9876543210n + 0x1n, 100 0xFEDCBA9876543211n, 101 'The result of (0xFEDCBA9876543210n + 0x1n) is 0xFEDCBA9876543211n' 102 ); 103 104 assert.sameValue( 105 0xFEDCBA9876543210n + 0x0n, 106 0xFEDCBA9876543210n, 107 'The result of (0xFEDCBA9876543210n + 0x0n) is 0xFEDCBA9876543210n' 108 ); 109 110 assert.sameValue( 111 0xFEDCBA9876543210n + 0x0n, 112 0xFEDCBA9876543210n, 113 'The result of (0xFEDCBA9876543210n + 0x0n) is 0xFEDCBA9876543210n' 114 ); 115 116 assert.sameValue( 117 0xFEDCBA9876543210n + -0x1n, 118 0xFEDCBA987654320Fn, 119 'The result of (0xFEDCBA9876543210n + -0x1n) is 0xFEDCBA987654320Fn' 120 ); 121 122 assert.sameValue( 123 0xFEDCBA9876543210n + -0x1n, 124 0xFEDCBA987654320Fn, 125 'The result of (0xFEDCBA9876543210n + -0x1n) is 0xFEDCBA987654320Fn' 126 ); 127 128 assert.sameValue( 129 0xFEDCBA9876543210n + -0x2n, 130 0xFEDCBA987654320En, 131 'The result of (0xFEDCBA9876543210n + -0x2n) is 0xFEDCBA987654320En' 132 ); 133 134 assert.sameValue( 135 0xFEDCBA9876543210n + -0x2n, 136 0xFEDCBA987654320En, 137 'The result of (0xFEDCBA9876543210n + -0x2n) is 0xFEDCBA987654320En' 138 ); 139 140 assert.sameValue( 141 0xFEDCBA9876543210n + -0x3n, 142 0xFEDCBA987654320Dn, 143 'The result of (0xFEDCBA9876543210n + -0x3n) is 0xFEDCBA987654320Dn' 144 ); 145 146 assert.sameValue( 147 0xFEDCBA9876543210n + -0x3n, 148 0xFEDCBA987654320Dn, 149 'The result of (0xFEDCBA9876543210n + -0x3n) is 0xFEDCBA987654320Dn' 150 ); 151 152 assert.sameValue( 153 0xFEDCBA9876543210n + -0x1234n, 154 0xFEDCBA9876541FDCn, 155 'The result of (0xFEDCBA9876543210n + -0x1234n) is 0xFEDCBA9876541FDCn' 156 ); 157 158 assert.sameValue( 159 0xFEDCBA9876543210n + -0x1234n, 160 0xFEDCBA9876541FDCn, 161 'The result of (0xFEDCBA9876543210n + -0x1234n) is 0xFEDCBA9876541FDCn' 162 ); 163 164 assert.sameValue( 165 0xFEDCBA9876543210n + -0xFEDCBA97n, 166 0xFEDCBA9777777779n, 167 'The result of (0xFEDCBA9876543210n + -0xFEDCBA97n) is 0xFEDCBA9777777779n' 168 ); 169 170 assert.sameValue( 171 0xFEDCBA9876543210n + -0xFEDCBA97n, 172 0xFEDCBA9777777779n, 173 'The result of (0xFEDCBA9876543210n + -0xFEDCBA97n) is 0xFEDCBA9777777779n' 174 ); 175 176 assert.sameValue( 177 0xFEDCBA9876543210n + -0xFEDCBA98n, 178 0xFEDCBA9777777778n, 179 'The result of (0xFEDCBA9876543210n + -0xFEDCBA98n) is 0xFEDCBA9777777778n' 180 ); 181 182 assert.sameValue( 183 0xFEDCBA9876543210n + -0xFEDCBA98n, 184 0xFEDCBA9777777778n, 185 'The result of (0xFEDCBA9876543210n + -0xFEDCBA98n) is 0xFEDCBA9777777778n' 186 ); 187 188 assert.sameValue( 189 0xFEDCBA9876543210n + -0xFEDCBA987654320Fn, 190 0x1n, 191 'The result of (0xFEDCBA9876543210n + -0xFEDCBA987654320Fn) is 0x1n' 192 ); 193 194 assert.sameValue( 195 0xFEDCBA9876543210n + -0xFEDCBA987654320Fn, 196 0x1n, 197 'The result of (0xFEDCBA9876543210n + -0xFEDCBA987654320Fn) is 0x1n' 198 ); 199 200 assert.sameValue( 201 0xFEDCBA9876543210n + -0xFEDCBA9876543210n, 202 0x0n, 203 'The result of (0xFEDCBA9876543210n + -0xFEDCBA9876543210n) is 0x0n' 204 ); 205 206 assert.sameValue( 207 0xFEDCBA9876543210n + -0xFEDCBA9876543210n, 208 0x0n, 209 'The result of (0xFEDCBA9876543210n + -0xFEDCBA9876543210n) is 0x0n' 210 ); 211 212 assert.sameValue( 213 0xFEDCBA987654320Fn + 0xFEDCBA987654320Fn, 214 0x1FDB97530ECA8641En, 215 'The result of (0xFEDCBA987654320Fn + 0xFEDCBA987654320Fn) is 0x1FDB97530ECA8641En' 216 ); 217 218 assert.sameValue( 219 0xFEDCBA987654320Fn + 0xFEDCBA987654320Fn, 220 0x1FDB97530ECA8641En, 221 'The result of (0xFEDCBA987654320Fn + 0xFEDCBA987654320Fn) is 0x1FDB97530ECA8641En' 222 ); 223 224 assert.sameValue( 225 0xFEDCBA987654320Fn + 0xFEDCBA98n, 226 0xFEDCBA997530ECA7n, 227 'The result of (0xFEDCBA987654320Fn + 0xFEDCBA98n) is 0xFEDCBA997530ECA7n' 228 ); 229 230 assert.sameValue( 231 0xFEDCBA987654320Fn + 0xFEDCBA98n, 232 0xFEDCBA997530ECA7n, 233 'The result of (0xFEDCBA987654320Fn + 0xFEDCBA98n) is 0xFEDCBA997530ECA7n' 234 ); 235 236 assert.sameValue( 237 0xFEDCBA987654320Fn + 0xFEDCBA97n, 238 0xFEDCBA997530ECA6n, 239 'The result of (0xFEDCBA987654320Fn + 0xFEDCBA97n) is 0xFEDCBA997530ECA6n' 240 ); 241 242 assert.sameValue( 243 0xFEDCBA987654320Fn + 0xFEDCBA97n, 244 0xFEDCBA997530ECA6n, 245 'The result of (0xFEDCBA987654320Fn + 0xFEDCBA97n) is 0xFEDCBA997530ECA6n' 246 ); 247 248 assert.sameValue( 249 0xFEDCBA987654320Fn + 0x1234n, 250 0xFEDCBA9876544443n, 251 'The result of (0xFEDCBA987654320Fn + 0x1234n) is 0xFEDCBA9876544443n' 252 ); 253 254 assert.sameValue( 255 0xFEDCBA987654320Fn + 0x1234n, 256 0xFEDCBA9876544443n, 257 'The result of (0xFEDCBA987654320Fn + 0x1234n) is 0xFEDCBA9876544443n' 258 ); 259 260 assert.sameValue( 261 0xFEDCBA987654320Fn + 0x3n, 262 0xFEDCBA9876543212n, 263 'The result of (0xFEDCBA987654320Fn + 0x3n) is 0xFEDCBA9876543212n' 264 ); 265 266 assert.sameValue( 267 0xFEDCBA987654320Fn + 0x3n, 268 0xFEDCBA9876543212n, 269 'The result of (0xFEDCBA987654320Fn + 0x3n) is 0xFEDCBA9876543212n' 270 ); 271 272 assert.sameValue( 273 0xFEDCBA987654320Fn + 0x2n, 274 0xFEDCBA9876543211n, 275 'The result of (0xFEDCBA987654320Fn + 0x2n) is 0xFEDCBA9876543211n' 276 ); 277 278 assert.sameValue( 279 0xFEDCBA987654320Fn + 0x2n, 280 0xFEDCBA9876543211n, 281 'The result of (0xFEDCBA987654320Fn + 0x2n) is 0xFEDCBA9876543211n' 282 ); 283 284 assert.sameValue( 285 0xFEDCBA987654320Fn + 0x1n, 286 0xFEDCBA9876543210n, 287 'The result of (0xFEDCBA987654320Fn + 0x1n) is 0xFEDCBA9876543210n' 288 ); 289 290 assert.sameValue( 291 0xFEDCBA987654320Fn + 0x1n, 292 0xFEDCBA9876543210n, 293 'The result of (0xFEDCBA987654320Fn + 0x1n) is 0xFEDCBA9876543210n' 294 ); 295 296 assert.sameValue( 297 0xFEDCBA987654320Fn + 0x0n, 298 0xFEDCBA987654320Fn, 299 'The result of (0xFEDCBA987654320Fn + 0x0n) is 0xFEDCBA987654320Fn' 300 ); 301 302 assert.sameValue( 303 0xFEDCBA987654320Fn + 0x0n, 304 0xFEDCBA987654320Fn, 305 'The result of (0xFEDCBA987654320Fn + 0x0n) is 0xFEDCBA987654320Fn' 306 ); 307 308 assert.sameValue( 309 0xFEDCBA987654320Fn + -0x1n, 310 0xFEDCBA987654320En, 311 'The result of (0xFEDCBA987654320Fn + -0x1n) is 0xFEDCBA987654320En' 312 ); 313 314 assert.sameValue( 315 0xFEDCBA987654320Fn + -0x1n, 316 0xFEDCBA987654320En, 317 'The result of (0xFEDCBA987654320Fn + -0x1n) is 0xFEDCBA987654320En' 318 ); 319 320 assert.sameValue( 321 0xFEDCBA987654320Fn + -0x2n, 322 0xFEDCBA987654320Dn, 323 'The result of (0xFEDCBA987654320Fn + -0x2n) is 0xFEDCBA987654320Dn' 324 ); 325 326 assert.sameValue( 327 0xFEDCBA987654320Fn + -0x2n, 328 0xFEDCBA987654320Dn, 329 'The result of (0xFEDCBA987654320Fn + -0x2n) is 0xFEDCBA987654320Dn' 330 ); 331 332 assert.sameValue( 333 0xFEDCBA987654320Fn + -0x3n, 334 0xFEDCBA987654320Cn, 335 'The result of (0xFEDCBA987654320Fn + -0x3n) is 0xFEDCBA987654320Cn' 336 ); 337 338 assert.sameValue( 339 0xFEDCBA987654320Fn + -0x3n, 340 0xFEDCBA987654320Cn, 341 'The result of (0xFEDCBA987654320Fn + -0x3n) is 0xFEDCBA987654320Cn' 342 ); 343 344 assert.sameValue( 345 0xFEDCBA987654320Fn + -0x1234n, 346 0xFEDCBA9876541FDBn, 347 'The result of (0xFEDCBA987654320Fn + -0x1234n) is 0xFEDCBA9876541FDBn' 348 ); 349 350 assert.sameValue( 351 0xFEDCBA987654320Fn + -0x1234n, 352 0xFEDCBA9876541FDBn, 353 'The result of (0xFEDCBA987654320Fn + -0x1234n) is 0xFEDCBA9876541FDBn' 354 ); 355 356 assert.sameValue( 357 0xFEDCBA987654320Fn + -0xFEDCBA97n, 358 0xFEDCBA9777777778n, 359 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA97n) is 0xFEDCBA9777777778n' 360 ); 361 362 assert.sameValue( 363 0xFEDCBA987654320Fn + -0xFEDCBA97n, 364 0xFEDCBA9777777778n, 365 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA97n) is 0xFEDCBA9777777778n' 366 ); 367 368 assert.sameValue( 369 0xFEDCBA987654320Fn + -0xFEDCBA98n, 370 0xFEDCBA9777777777n, 371 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA98n) is 0xFEDCBA9777777777n' 372 ); 373 374 assert.sameValue( 375 0xFEDCBA987654320Fn + -0xFEDCBA98n, 376 0xFEDCBA9777777777n, 377 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA98n) is 0xFEDCBA9777777777n' 378 ); 379 380 assert.sameValue( 381 0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn, 382 0x0n, 383 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn) is 0x0n' 384 ); 385 386 assert.sameValue( 387 0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn, 388 0x0n, 389 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn) is 0x0n' 390 ); 391 392 assert.sameValue( 393 0xFEDCBA987654320Fn + -0xFEDCBA9876543210n, 394 -0x1n, 395 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA9876543210n) is -0x1n' 396 ); 397 398 assert.sameValue( 399 0xFEDCBA987654320Fn + -0xFEDCBA9876543210n, 400 -0x1n, 401 'The result of (0xFEDCBA987654320Fn + -0xFEDCBA9876543210n) is -0x1n' 402 ); 403 404 assert.sameValue( 405 0xFEDCBA98n + 0xFEDCBA98n, 406 0x1FDB97530n, 407 'The result of (0xFEDCBA98n + 0xFEDCBA98n) is 0x1FDB97530n' 408 ); 409 410 assert.sameValue( 411 0xFEDCBA98n + 0xFEDCBA98n, 412 0x1FDB97530n, 413 'The result of (0xFEDCBA98n + 0xFEDCBA98n) is 0x1FDB97530n' 414 ); 415 416 assert.sameValue( 417 0xFEDCBA98n + 0xFEDCBA97n, 418 0x1FDB9752Fn, 419 'The result of (0xFEDCBA98n + 0xFEDCBA97n) is 0x1FDB9752Fn' 420 ); 421 422 assert.sameValue( 423 0xFEDCBA98n + 0xFEDCBA97n, 424 0x1FDB9752Fn, 425 'The result of (0xFEDCBA98n + 0xFEDCBA97n) is 0x1FDB9752Fn' 426 ); 427 428 assert.sameValue( 429 0xFEDCBA98n + 0x1234n, 430 0xFEDCCCCCn, 431 'The result of (0xFEDCBA98n + 0x1234n) is 0xFEDCCCCCn' 432 ); 433 434 assert.sameValue( 435 0xFEDCBA98n + 0x1234n, 436 0xFEDCCCCCn, 437 'The result of (0xFEDCBA98n + 0x1234n) is 0xFEDCCCCCn' 438 ); 439 440 assert.sameValue( 441 0xFEDCBA98n + 0x3n, 442 0xFEDCBA9Bn, 443 'The result of (0xFEDCBA98n + 0x3n) is 0xFEDCBA9Bn' 444 ); 445 446 assert.sameValue( 447 0xFEDCBA98n + 0x3n, 448 0xFEDCBA9Bn, 449 'The result of (0xFEDCBA98n + 0x3n) is 0xFEDCBA9Bn' 450 ); 451 452 assert.sameValue( 453 0xFEDCBA98n + 0x2n, 454 0xFEDCBA9An, 455 'The result of (0xFEDCBA98n + 0x2n) is 0xFEDCBA9An' 456 ); 457 458 assert.sameValue( 459 0xFEDCBA98n + 0x2n, 460 0xFEDCBA9An, 461 'The result of (0xFEDCBA98n + 0x2n) is 0xFEDCBA9An' 462 ); 463 464 assert.sameValue( 465 0xFEDCBA98n + 0x1n, 466 0xFEDCBA99n, 467 'The result of (0xFEDCBA98n + 0x1n) is 0xFEDCBA99n' 468 ); 469 470 assert.sameValue( 471 0xFEDCBA98n + 0x1n, 472 0xFEDCBA99n, 473 'The result of (0xFEDCBA98n + 0x1n) is 0xFEDCBA99n' 474 ); 475 476 assert.sameValue( 477 0xFEDCBA98n + 0x0n, 478 0xFEDCBA98n, 479 'The result of (0xFEDCBA98n + 0x0n) is 0xFEDCBA98n' 480 ); 481 482 assert.sameValue( 483 0xFEDCBA98n + 0x0n, 484 0xFEDCBA98n, 485 'The result of (0xFEDCBA98n + 0x0n) is 0xFEDCBA98n' 486 ); 487 488 assert.sameValue( 489 0xFEDCBA98n + -0x1n, 490 0xFEDCBA97n, 491 'The result of (0xFEDCBA98n + -0x1n) is 0xFEDCBA97n' 492 ); 493 494 assert.sameValue( 495 0xFEDCBA98n + -0x1n, 496 0xFEDCBA97n, 497 'The result of (0xFEDCBA98n + -0x1n) is 0xFEDCBA97n' 498 ); 499 500 assert.sameValue( 501 0xFEDCBA98n + -0x2n, 502 0xFEDCBA96n, 503 'The result of (0xFEDCBA98n + -0x2n) is 0xFEDCBA96n' 504 ); 505 506 assert.sameValue( 507 0xFEDCBA98n + -0x2n, 508 0xFEDCBA96n, 509 'The result of (0xFEDCBA98n + -0x2n) is 0xFEDCBA96n' 510 ); 511 512 assert.sameValue( 513 0xFEDCBA98n + -0x3n, 514 0xFEDCBA95n, 515 'The result of (0xFEDCBA98n + -0x3n) is 0xFEDCBA95n' 516 ); 517 518 assert.sameValue( 519 0xFEDCBA98n + -0x3n, 520 0xFEDCBA95n, 521 'The result of (0xFEDCBA98n + -0x3n) is 0xFEDCBA95n' 522 ); 523 524 assert.sameValue( 525 0xFEDCBA98n + -0x1234n, 526 0xFEDCA864n, 527 'The result of (0xFEDCBA98n + -0x1234n) is 0xFEDCA864n' 528 ); 529 530 assert.sameValue( 531 0xFEDCBA98n + -0x1234n, 532 0xFEDCA864n, 533 'The result of (0xFEDCBA98n + -0x1234n) is 0xFEDCA864n' 534 ); 535 536 assert.sameValue( 537 0xFEDCBA98n + -0xFEDCBA97n, 538 0x1n, 539 'The result of (0xFEDCBA98n + -0xFEDCBA97n) is 0x1n' 540 ); 541 542 assert.sameValue( 543 0xFEDCBA98n + -0xFEDCBA97n, 544 0x1n, 545 'The result of (0xFEDCBA98n + -0xFEDCBA97n) is 0x1n' 546 ); 547 548 assert.sameValue( 549 0xFEDCBA98n + -0xFEDCBA98n, 550 0x0n, 551 'The result of (0xFEDCBA98n + -0xFEDCBA98n) is 0x0n' 552 ); 553 554 assert.sameValue( 555 0xFEDCBA98n + -0xFEDCBA98n, 556 0x0n, 557 'The result of (0xFEDCBA98n + -0xFEDCBA98n) is 0x0n' 558 ); 559 560 assert.sameValue( 561 0xFEDCBA98n + -0xFEDCBA987654320Fn, 562 -0xFEDCBA9777777777n, 563 'The result of (0xFEDCBA98n + -0xFEDCBA987654320Fn) is -0xFEDCBA9777777777n' 564 ); 565 566 assert.sameValue( 567 0xFEDCBA98n + -0xFEDCBA987654320Fn, 568 -0xFEDCBA9777777777n, 569 'The result of (0xFEDCBA98n + -0xFEDCBA987654320Fn) is -0xFEDCBA9777777777n' 570 ); 571 572 assert.sameValue( 573 0xFEDCBA98n + -0xFEDCBA9876543210n, 574 -0xFEDCBA9777777778n, 575 'The result of (0xFEDCBA98n + -0xFEDCBA9876543210n) is -0xFEDCBA9777777778n' 576 ); 577 578 assert.sameValue( 579 0xFEDCBA98n + -0xFEDCBA9876543210n, 580 -0xFEDCBA9777777778n, 581 'The result of (0xFEDCBA98n + -0xFEDCBA9876543210n) is -0xFEDCBA9777777778n' 582 ); 583 584 assert.sameValue( 585 0xFEDCBA97n + 0xFEDCBA97n, 586 0x1FDB9752En, 587 'The result of (0xFEDCBA97n + 0xFEDCBA97n) is 0x1FDB9752En' 588 ); 589 590 assert.sameValue( 591 0xFEDCBA97n + 0xFEDCBA97n, 592 0x1FDB9752En, 593 'The result of (0xFEDCBA97n + 0xFEDCBA97n) is 0x1FDB9752En' 594 ); 595 596 assert.sameValue( 597 0xFEDCBA97n + 0x1234n, 598 0xFEDCCCCBn, 599 'The result of (0xFEDCBA97n + 0x1234n) is 0xFEDCCCCBn' 600 ); 601 602 assert.sameValue( 603 0xFEDCBA97n + 0x1234n, 604 0xFEDCCCCBn, 605 'The result of (0xFEDCBA97n + 0x1234n) is 0xFEDCCCCBn' 606 ); 607 608 assert.sameValue( 609 0xFEDCBA97n + 0x3n, 610 0xFEDCBA9An, 611 'The result of (0xFEDCBA97n + 0x3n) is 0xFEDCBA9An' 612 ); 613 614 assert.sameValue( 615 0xFEDCBA97n + 0x3n, 616 0xFEDCBA9An, 617 'The result of (0xFEDCBA97n + 0x3n) is 0xFEDCBA9An' 618 ); 619 620 assert.sameValue( 621 0xFEDCBA97n + 0x2n, 622 0xFEDCBA99n, 623 'The result of (0xFEDCBA97n + 0x2n) is 0xFEDCBA99n' 624 ); 625 626 assert.sameValue( 627 0xFEDCBA97n + 0x2n, 628 0xFEDCBA99n, 629 'The result of (0xFEDCBA97n + 0x2n) is 0xFEDCBA99n' 630 ); 631 632 assert.sameValue( 633 0xFEDCBA97n + 0x1n, 634 0xFEDCBA98n, 635 'The result of (0xFEDCBA97n + 0x1n) is 0xFEDCBA98n' 636 ); 637 638 assert.sameValue( 639 0xFEDCBA97n + 0x1n, 640 0xFEDCBA98n, 641 'The result of (0xFEDCBA97n + 0x1n) is 0xFEDCBA98n' 642 ); 643 644 assert.sameValue( 645 0xFEDCBA97n + 0x0n, 646 0xFEDCBA97n, 647 'The result of (0xFEDCBA97n + 0x0n) is 0xFEDCBA97n' 648 ); 649 650 assert.sameValue( 651 0xFEDCBA97n + 0x0n, 652 0xFEDCBA97n, 653 'The result of (0xFEDCBA97n + 0x0n) is 0xFEDCBA97n' 654 ); 655 656 assert.sameValue( 657 0xFEDCBA97n + -0x1n, 658 0xFEDCBA96n, 659 'The result of (0xFEDCBA97n + -0x1n) is 0xFEDCBA96n' 660 ); 661 662 assert.sameValue( 663 0xFEDCBA97n + -0x1n, 664 0xFEDCBA96n, 665 'The result of (0xFEDCBA97n + -0x1n) is 0xFEDCBA96n' 666 ); 667 668 assert.sameValue( 669 0xFEDCBA97n + -0x2n, 670 0xFEDCBA95n, 671 'The result of (0xFEDCBA97n + -0x2n) is 0xFEDCBA95n' 672 ); 673 674 assert.sameValue( 675 0xFEDCBA97n + -0x2n, 676 0xFEDCBA95n, 677 'The result of (0xFEDCBA97n + -0x2n) is 0xFEDCBA95n' 678 ); 679 680 assert.sameValue( 681 0xFEDCBA97n + -0x3n, 682 0xFEDCBA94n, 683 'The result of (0xFEDCBA97n + -0x3n) is 0xFEDCBA94n' 684 ); 685 686 assert.sameValue( 687 0xFEDCBA97n + -0x3n, 688 0xFEDCBA94n, 689 'The result of (0xFEDCBA97n + -0x3n) is 0xFEDCBA94n' 690 ); 691 692 assert.sameValue( 693 0xFEDCBA97n + -0x1234n, 694 0xFEDCA863n, 695 'The result of (0xFEDCBA97n + -0x1234n) is 0xFEDCA863n' 696 ); 697 698 assert.sameValue( 699 0xFEDCBA97n + -0x1234n, 700 0xFEDCA863n, 701 'The result of (0xFEDCBA97n + -0x1234n) is 0xFEDCA863n' 702 ); 703 704 assert.sameValue( 705 0xFEDCBA97n + -0xFEDCBA97n, 706 0x0n, 707 'The result of (0xFEDCBA97n + -0xFEDCBA97n) is 0x0n' 708 ); 709 710 assert.sameValue( 711 0xFEDCBA97n + -0xFEDCBA97n, 712 0x0n, 713 'The result of (0xFEDCBA97n + -0xFEDCBA97n) is 0x0n' 714 ); 715 716 assert.sameValue( 717 0xFEDCBA97n + -0xFEDCBA98n, 718 -0x1n, 719 'The result of (0xFEDCBA97n + -0xFEDCBA98n) is -0x1n' 720 ); 721 722 assert.sameValue( 723 0xFEDCBA97n + -0xFEDCBA98n, 724 -0x1n, 725 'The result of (0xFEDCBA97n + -0xFEDCBA98n) is -0x1n' 726 ); 727 728 assert.sameValue( 729 0xFEDCBA97n + -0xFEDCBA987654320Fn, 730 -0xFEDCBA9777777778n, 731 'The result of (0xFEDCBA97n + -0xFEDCBA987654320Fn) is -0xFEDCBA9777777778n' 732 ); 733 734 assert.sameValue( 735 0xFEDCBA97n + -0xFEDCBA987654320Fn, 736 -0xFEDCBA9777777778n, 737 'The result of (0xFEDCBA97n + -0xFEDCBA987654320Fn) is -0xFEDCBA9777777778n' 738 ); 739 740 assert.sameValue( 741 0xFEDCBA97n + -0xFEDCBA9876543210n, 742 -0xFEDCBA9777777779n, 743 'The result of (0xFEDCBA97n + -0xFEDCBA9876543210n) is -0xFEDCBA9777777779n' 744 ); 745 746 assert.sameValue( 747 0xFEDCBA97n + -0xFEDCBA9876543210n, 748 -0xFEDCBA9777777779n, 749 'The result of (0xFEDCBA97n + -0xFEDCBA9876543210n) is -0xFEDCBA9777777779n' 750 ); 751 752 assert.sameValue(0x1234n + 0x1234n, 0x2468n, 'The result of (0x1234n + 0x1234n) is 0x2468n'); 753 assert.sameValue(0x1234n + 0x1234n, 0x2468n, 'The result of (0x1234n + 0x1234n) is 0x2468n'); 754 assert.sameValue(0x1234n + 0x3n, 0x1237n, 'The result of (0x1234n + 0x3n) is 0x1237n'); 755 assert.sameValue(0x1234n + 0x3n, 0x1237n, 'The result of (0x1234n + 0x3n) is 0x1237n'); 756 assert.sameValue(0x1234n + 0x2n, 0x1236n, 'The result of (0x1234n + 0x2n) is 0x1236n'); 757 assert.sameValue(0x1234n + 0x2n, 0x1236n, 'The result of (0x1234n + 0x2n) is 0x1236n'); 758 assert.sameValue(0x1234n + 0x1n, 0x1235n, 'The result of (0x1234n + 0x1n) is 0x1235n'); 759 assert.sameValue(0x1234n + 0x1n, 0x1235n, 'The result of (0x1234n + 0x1n) is 0x1235n'); 760 assert.sameValue(0x1234n + 0x0n, 0x1234n, 'The result of (0x1234n + 0x0n) is 0x1234n'); 761 assert.sameValue(0x1234n + 0x0n, 0x1234n, 'The result of (0x1234n + 0x0n) is 0x1234n'); 762 assert.sameValue(0x1234n + -0x1n, 0x1233n, 'The result of (0x1234n + -0x1n) is 0x1233n'); 763 assert.sameValue(0x1234n + -0x1n, 0x1233n, 'The result of (0x1234n + -0x1n) is 0x1233n'); 764 assert.sameValue(0x1234n + -0x2n, 0x1232n, 'The result of (0x1234n + -0x2n) is 0x1232n'); 765 assert.sameValue(0x1234n + -0x2n, 0x1232n, 'The result of (0x1234n + -0x2n) is 0x1232n'); 766 assert.sameValue(0x1234n + -0x3n, 0x1231n, 'The result of (0x1234n + -0x3n) is 0x1231n'); 767 assert.sameValue(0x1234n + -0x3n, 0x1231n, 'The result of (0x1234n + -0x3n) is 0x1231n'); 768 assert.sameValue(0x1234n + -0x1234n, 0x0n, 'The result of (0x1234n + -0x1234n) is 0x0n'); 769 assert.sameValue(0x1234n + -0x1234n, 0x0n, 'The result of (0x1234n + -0x1234n) is 0x0n'); 770 771 assert.sameValue( 772 0x1234n + -0xFEDCBA97n, 773 -0xFEDCA863n, 774 'The result of (0x1234n + -0xFEDCBA97n) is -0xFEDCA863n' 775 ); 776 777 assert.sameValue( 778 0x1234n + -0xFEDCBA97n, 779 -0xFEDCA863n, 780 'The result of (0x1234n + -0xFEDCBA97n) is -0xFEDCA863n' 781 ); 782 783 assert.sameValue( 784 0x1234n + -0xFEDCBA98n, 785 -0xFEDCA864n, 786 'The result of (0x1234n + -0xFEDCBA98n) is -0xFEDCA864n' 787 ); 788 789 assert.sameValue( 790 0x1234n + -0xFEDCBA98n, 791 -0xFEDCA864n, 792 'The result of (0x1234n + -0xFEDCBA98n) is -0xFEDCA864n' 793 ); 794 795 assert.sameValue( 796 0x1234n + -0xFEDCBA987654320Fn, 797 -0xFEDCBA9876541FDBn, 798 'The result of (0x1234n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876541FDBn' 799 ); 800 801 assert.sameValue( 802 0x1234n + -0xFEDCBA987654320Fn, 803 -0xFEDCBA9876541FDBn, 804 'The result of (0x1234n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876541FDBn' 805 ); 806 807 assert.sameValue( 808 0x1234n + -0xFEDCBA9876543210n, 809 -0xFEDCBA9876541FDCn, 810 'The result of (0x1234n + -0xFEDCBA9876543210n) is -0xFEDCBA9876541FDCn' 811 ); 812 813 assert.sameValue( 814 0x1234n + -0xFEDCBA9876543210n, 815 -0xFEDCBA9876541FDCn, 816 'The result of (0x1234n + -0xFEDCBA9876543210n) is -0xFEDCBA9876541FDCn' 817 ); 818 819 assert.sameValue(0x3n + 0x3n, 0x6n, 'The result of (0x3n + 0x3n) is 0x6n'); 820 assert.sameValue(0x3n + 0x3n, 0x6n, 'The result of (0x3n + 0x3n) is 0x6n'); 821 assert.sameValue(0x3n + 0x2n, 0x5n, 'The result of (0x3n + 0x2n) is 0x5n'); 822 assert.sameValue(0x3n + 0x2n, 0x5n, 'The result of (0x3n + 0x2n) is 0x5n'); 823 assert.sameValue(0x3n + 0x1n, 0x4n, 'The result of (0x3n + 0x1n) is 0x4n'); 824 assert.sameValue(0x3n + 0x1n, 0x4n, 'The result of (0x3n + 0x1n) is 0x4n'); 825 assert.sameValue(0x3n + 0x0n, 0x3n, 'The result of (0x3n + 0x0n) is 0x3n'); 826 assert.sameValue(0x3n + 0x0n, 0x3n, 'The result of (0x3n + 0x0n) is 0x3n'); 827 assert.sameValue(0x3n + -0x1n, 0x2n, 'The result of (0x3n + -0x1n) is 0x2n'); 828 assert.sameValue(0x3n + -0x1n, 0x2n, 'The result of (0x3n + -0x1n) is 0x2n'); 829 assert.sameValue(0x3n + -0x2n, 0x1n, 'The result of (0x3n + -0x2n) is 0x1n'); 830 assert.sameValue(0x3n + -0x2n, 0x1n, 'The result of (0x3n + -0x2n) is 0x1n'); 831 assert.sameValue(0x3n + -0x3n, 0x0n, 'The result of (0x3n + -0x3n) is 0x0n'); 832 assert.sameValue(0x3n + -0x3n, 0x0n, 'The result of (0x3n + -0x3n) is 0x0n'); 833 assert.sameValue(0x3n + -0x1234n, -0x1231n, 'The result of (0x3n + -0x1234n) is -0x1231n'); 834 assert.sameValue(0x3n + -0x1234n, -0x1231n, 'The result of (0x3n + -0x1234n) is -0x1231n'); 835 836 assert.sameValue( 837 0x3n + -0xFEDCBA97n, 838 -0xFEDCBA94n, 839 'The result of (0x3n + -0xFEDCBA97n) is -0xFEDCBA94n' 840 ); 841 842 assert.sameValue( 843 0x3n + -0xFEDCBA97n, 844 -0xFEDCBA94n, 845 'The result of (0x3n + -0xFEDCBA97n) is -0xFEDCBA94n' 846 ); 847 848 assert.sameValue( 849 0x3n + -0xFEDCBA98n, 850 -0xFEDCBA95n, 851 'The result of (0x3n + -0xFEDCBA98n) is -0xFEDCBA95n' 852 ); 853 854 assert.sameValue( 855 0x3n + -0xFEDCBA98n, 856 -0xFEDCBA95n, 857 'The result of (0x3n + -0xFEDCBA98n) is -0xFEDCBA95n' 858 ); 859 860 assert.sameValue( 861 0x3n + -0xFEDCBA987654320Fn, 862 -0xFEDCBA987654320Cn, 863 'The result of (0x3n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320Cn' 864 ); 865 866 assert.sameValue( 867 0x3n + -0xFEDCBA987654320Fn, 868 -0xFEDCBA987654320Cn, 869 'The result of (0x3n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320Cn' 870 ); 871 872 assert.sameValue( 873 0x3n + -0xFEDCBA9876543210n, 874 -0xFEDCBA987654320Dn, 875 'The result of (0x3n + -0xFEDCBA9876543210n) is -0xFEDCBA987654320Dn' 876 ); 877 878 assert.sameValue( 879 0x3n + -0xFEDCBA9876543210n, 880 -0xFEDCBA987654320Dn, 881 'The result of (0x3n + -0xFEDCBA9876543210n) is -0xFEDCBA987654320Dn' 882 ); 883 884 assert.sameValue(0x2n + 0x2n, 0x4n, 'The result of (0x2n + 0x2n) is 0x4n'); 885 assert.sameValue(0x2n + 0x2n, 0x4n, 'The result of (0x2n + 0x2n) is 0x4n'); 886 assert.sameValue(0x2n + 0x1n, 0x3n, 'The result of (0x2n + 0x1n) is 0x3n'); 887 assert.sameValue(0x2n + 0x1n, 0x3n, 'The result of (0x2n + 0x1n) is 0x3n'); 888 assert.sameValue(0x2n + 0x0n, 0x2n, 'The result of (0x2n + 0x0n) is 0x2n'); 889 assert.sameValue(0x2n + 0x0n, 0x2n, 'The result of (0x2n + 0x0n) is 0x2n'); 890 assert.sameValue(0x2n + -0x1n, 0x1n, 'The result of (0x2n + -0x1n) is 0x1n'); 891 assert.sameValue(0x2n + -0x1n, 0x1n, 'The result of (0x2n + -0x1n) is 0x1n'); 892 assert.sameValue(0x2n + -0x2n, 0x0n, 'The result of (0x2n + -0x2n) is 0x0n'); 893 assert.sameValue(0x2n + -0x2n, 0x0n, 'The result of (0x2n + -0x2n) is 0x0n'); 894 assert.sameValue(0x2n + -0x3n, -0x1n, 'The result of (0x2n + -0x3n) is -0x1n'); 895 assert.sameValue(0x2n + -0x3n, -0x1n, 'The result of (0x2n + -0x3n) is -0x1n'); 896 assert.sameValue(0x2n + -0x1234n, -0x1232n, 'The result of (0x2n + -0x1234n) is -0x1232n'); 897 assert.sameValue(0x2n + -0x1234n, -0x1232n, 'The result of (0x2n + -0x1234n) is -0x1232n'); 898 899 assert.sameValue( 900 0x2n + -0xFEDCBA97n, 901 -0xFEDCBA95n, 902 'The result of (0x2n + -0xFEDCBA97n) is -0xFEDCBA95n' 903 ); 904 905 assert.sameValue( 906 0x2n + -0xFEDCBA97n, 907 -0xFEDCBA95n, 908 'The result of (0x2n + -0xFEDCBA97n) is -0xFEDCBA95n' 909 ); 910 911 assert.sameValue( 912 0x2n + -0xFEDCBA98n, 913 -0xFEDCBA96n, 914 'The result of (0x2n + -0xFEDCBA98n) is -0xFEDCBA96n' 915 ); 916 917 assert.sameValue( 918 0x2n + -0xFEDCBA98n, 919 -0xFEDCBA96n, 920 'The result of (0x2n + -0xFEDCBA98n) is -0xFEDCBA96n' 921 ); 922 923 assert.sameValue( 924 0x2n + -0xFEDCBA987654320Fn, 925 -0xFEDCBA987654320Dn, 926 'The result of (0x2n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320Dn' 927 ); 928 929 assert.sameValue( 930 0x2n + -0xFEDCBA987654320Fn, 931 -0xFEDCBA987654320Dn, 932 'The result of (0x2n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320Dn' 933 ); 934 935 assert.sameValue( 936 0x2n + -0xFEDCBA9876543210n, 937 -0xFEDCBA987654320En, 938 'The result of (0x2n + -0xFEDCBA9876543210n) is -0xFEDCBA987654320En' 939 ); 940 941 assert.sameValue( 942 0x2n + -0xFEDCBA9876543210n, 943 -0xFEDCBA987654320En, 944 'The result of (0x2n + -0xFEDCBA9876543210n) is -0xFEDCBA987654320En' 945 ); 946 947 assert.sameValue(0x1n + 0x1n, 0x2n, 'The result of (0x1n + 0x1n) is 0x2n'); 948 assert.sameValue(0x1n + 0x1n, 0x2n, 'The result of (0x1n + 0x1n) is 0x2n'); 949 assert.sameValue(0x1n + 0x0n, 0x1n, 'The result of (0x1n + 0x0n) is 0x1n'); 950 assert.sameValue(0x1n + 0x0n, 0x1n, 'The result of (0x1n + 0x0n) is 0x1n'); 951 assert.sameValue(0x1n + -0x1n, 0x0n, 'The result of (0x1n + -0x1n) is 0x0n'); 952 assert.sameValue(0x1n + -0x1n, 0x0n, 'The result of (0x1n + -0x1n) is 0x0n'); 953 assert.sameValue(0x1n + -0x2n, -0x1n, 'The result of (0x1n + -0x2n) is -0x1n'); 954 assert.sameValue(0x1n + -0x2n, -0x1n, 'The result of (0x1n + -0x2n) is -0x1n'); 955 assert.sameValue(0x1n + -0x3n, -0x2n, 'The result of (0x1n + -0x3n) is -0x2n'); 956 assert.sameValue(0x1n + -0x3n, -0x2n, 'The result of (0x1n + -0x3n) is -0x2n'); 957 assert.sameValue(0x1n + -0x1234n, -0x1233n, 'The result of (0x1n + -0x1234n) is -0x1233n'); 958 assert.sameValue(0x1n + -0x1234n, -0x1233n, 'The result of (0x1n + -0x1234n) is -0x1233n'); 959 960 assert.sameValue( 961 0x1n + -0xFEDCBA97n, 962 -0xFEDCBA96n, 963 'The result of (0x1n + -0xFEDCBA97n) is -0xFEDCBA96n' 964 ); 965 966 assert.sameValue( 967 0x1n + -0xFEDCBA97n, 968 -0xFEDCBA96n, 969 'The result of (0x1n + -0xFEDCBA97n) is -0xFEDCBA96n' 970 ); 971 972 assert.sameValue( 973 0x1n + -0xFEDCBA98n, 974 -0xFEDCBA97n, 975 'The result of (0x1n + -0xFEDCBA98n) is -0xFEDCBA97n' 976 ); 977 978 assert.sameValue( 979 0x1n + -0xFEDCBA98n, 980 -0xFEDCBA97n, 981 'The result of (0x1n + -0xFEDCBA98n) is -0xFEDCBA97n' 982 ); 983 984 assert.sameValue( 985 0x1n + -0xFEDCBA987654320Fn, 986 -0xFEDCBA987654320En, 987 'The result of (0x1n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320En' 988 ); 989 990 assert.sameValue( 991 0x1n + -0xFEDCBA987654320Fn, 992 -0xFEDCBA987654320En, 993 'The result of (0x1n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320En' 994 ); 995 996 assert.sameValue( 997 0x1n + -0xFEDCBA9876543210n, 998 -0xFEDCBA987654320Fn, 999 'The result of (0x1n + -0xFEDCBA9876543210n) is -0xFEDCBA987654320Fn' 1000 ); 1001 1002 assert.sameValue( 1003 0x1n + -0xFEDCBA9876543210n, 1004 -0xFEDCBA987654320Fn, 1005 'The result of (0x1n + -0xFEDCBA9876543210n) is -0xFEDCBA987654320Fn' 1006 ); 1007 1008 assert.sameValue(0x0n + 0x0n, 0x0n, 'The result of (0x0n + 0x0n) is 0x0n'); 1009 assert.sameValue(0x0n + 0x0n, 0x0n, 'The result of (0x0n + 0x0n) is 0x0n'); 1010 assert.sameValue(0x0n + -0x1n, -0x1n, 'The result of (0x0n + -0x1n) is -0x1n'); 1011 assert.sameValue(0x0n + -0x1n, -0x1n, 'The result of (0x0n + -0x1n) is -0x1n'); 1012 assert.sameValue(0x0n + -0x2n, -0x2n, 'The result of (0x0n + -0x2n) is -0x2n'); 1013 assert.sameValue(0x0n + -0x2n, -0x2n, 'The result of (0x0n + -0x2n) is -0x2n'); 1014 assert.sameValue(0x0n + -0x3n, -0x3n, 'The result of (0x0n + -0x3n) is -0x3n'); 1015 assert.sameValue(0x0n + -0x3n, -0x3n, 'The result of (0x0n + -0x3n) is -0x3n'); 1016 assert.sameValue(0x0n + -0x1234n, -0x1234n, 'The result of (0x0n + -0x1234n) is -0x1234n'); 1017 assert.sameValue(0x0n + -0x1234n, -0x1234n, 'The result of (0x0n + -0x1234n) is -0x1234n'); 1018 1019 assert.sameValue( 1020 0x0n + -0xFEDCBA97n, 1021 -0xFEDCBA97n, 1022 'The result of (0x0n + -0xFEDCBA97n) is -0xFEDCBA97n' 1023 ); 1024 1025 assert.sameValue( 1026 0x0n + -0xFEDCBA97n, 1027 -0xFEDCBA97n, 1028 'The result of (0x0n + -0xFEDCBA97n) is -0xFEDCBA97n' 1029 ); 1030 1031 assert.sameValue( 1032 0x0n + -0xFEDCBA98n, 1033 -0xFEDCBA98n, 1034 'The result of (0x0n + -0xFEDCBA98n) is -0xFEDCBA98n' 1035 ); 1036 1037 assert.sameValue( 1038 0x0n + -0xFEDCBA98n, 1039 -0xFEDCBA98n, 1040 'The result of (0x0n + -0xFEDCBA98n) is -0xFEDCBA98n' 1041 ); 1042 1043 assert.sameValue( 1044 0x0n + -0xFEDCBA987654320Fn, 1045 -0xFEDCBA987654320Fn, 1046 'The result of (0x0n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320Fn' 1047 ); 1048 1049 assert.sameValue( 1050 0x0n + -0xFEDCBA987654320Fn, 1051 -0xFEDCBA987654320Fn, 1052 'The result of (0x0n + -0xFEDCBA987654320Fn) is -0xFEDCBA987654320Fn' 1053 ); 1054 1055 assert.sameValue( 1056 0x0n + -0xFEDCBA9876543210n, 1057 -0xFEDCBA9876543210n, 1058 'The result of (0x0n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543210n' 1059 ); 1060 1061 assert.sameValue( 1062 0x0n + -0xFEDCBA9876543210n, 1063 -0xFEDCBA9876543210n, 1064 'The result of (0x0n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543210n' 1065 ); 1066 1067 assert.sameValue(-0x1n + -0x1n, -0x2n, 'The result of (-0x1n + -0x1n) is -0x2n'); 1068 assert.sameValue(-0x1n + -0x1n, -0x2n, 'The result of (-0x1n + -0x1n) is -0x2n'); 1069 assert.sameValue(-0x1n + -0x2n, -0x3n, 'The result of (-0x1n + -0x2n) is -0x3n'); 1070 assert.sameValue(-0x1n + -0x2n, -0x3n, 'The result of (-0x1n + -0x2n) is -0x3n'); 1071 assert.sameValue(-0x1n + -0x3n, -0x4n, 'The result of (-0x1n + -0x3n) is -0x4n'); 1072 assert.sameValue(-0x1n + -0x3n, -0x4n, 'The result of (-0x1n + -0x3n) is -0x4n'); 1073 assert.sameValue(-0x1n + -0x1234n, -0x1235n, 'The result of (-0x1n + -0x1234n) is -0x1235n'); 1074 assert.sameValue(-0x1n + -0x1234n, -0x1235n, 'The result of (-0x1n + -0x1234n) is -0x1235n'); 1075 1076 assert.sameValue( 1077 -0x1n + -0xFEDCBA97n, 1078 -0xFEDCBA98n, 1079 'The result of (-0x1n + -0xFEDCBA97n) is -0xFEDCBA98n' 1080 ); 1081 1082 assert.sameValue( 1083 -0x1n + -0xFEDCBA97n, 1084 -0xFEDCBA98n, 1085 'The result of (-0x1n + -0xFEDCBA97n) is -0xFEDCBA98n' 1086 ); 1087 1088 assert.sameValue( 1089 -0x1n + -0xFEDCBA98n, 1090 -0xFEDCBA99n, 1091 'The result of (-0x1n + -0xFEDCBA98n) is -0xFEDCBA99n' 1092 ); 1093 1094 assert.sameValue( 1095 -0x1n + -0xFEDCBA98n, 1096 -0xFEDCBA99n, 1097 'The result of (-0x1n + -0xFEDCBA98n) is -0xFEDCBA99n' 1098 ); 1099 1100 assert.sameValue( 1101 -0x1n + -0xFEDCBA987654320Fn, 1102 -0xFEDCBA9876543210n, 1103 'The result of (-0x1n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876543210n' 1104 ); 1105 1106 assert.sameValue( 1107 -0x1n + -0xFEDCBA987654320Fn, 1108 -0xFEDCBA9876543210n, 1109 'The result of (-0x1n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876543210n' 1110 ); 1111 1112 assert.sameValue( 1113 -0x1n + -0xFEDCBA9876543210n, 1114 -0xFEDCBA9876543211n, 1115 'The result of (-0x1n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543211n' 1116 ); 1117 1118 assert.sameValue( 1119 -0x1n + -0xFEDCBA9876543210n, 1120 -0xFEDCBA9876543211n, 1121 'The result of (-0x1n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543211n' 1122 ); 1123 1124 assert.sameValue(-0x2n + -0x2n, -0x4n, 'The result of (-0x2n + -0x2n) is -0x4n'); 1125 assert.sameValue(-0x2n + -0x2n, -0x4n, 'The result of (-0x2n + -0x2n) is -0x4n'); 1126 assert.sameValue(-0x2n + -0x3n, -0x5n, 'The result of (-0x2n + -0x3n) is -0x5n'); 1127 assert.sameValue(-0x2n + -0x3n, -0x5n, 'The result of (-0x2n + -0x3n) is -0x5n'); 1128 assert.sameValue(-0x2n + -0x1234n, -0x1236n, 'The result of (-0x2n + -0x1234n) is -0x1236n'); 1129 assert.sameValue(-0x2n + -0x1234n, -0x1236n, 'The result of (-0x2n + -0x1234n) is -0x1236n'); 1130 1131 assert.sameValue( 1132 -0x2n + -0xFEDCBA97n, 1133 -0xFEDCBA99n, 1134 'The result of (-0x2n + -0xFEDCBA97n) is -0xFEDCBA99n' 1135 ); 1136 1137 assert.sameValue( 1138 -0x2n + -0xFEDCBA97n, 1139 -0xFEDCBA99n, 1140 'The result of (-0x2n + -0xFEDCBA97n) is -0xFEDCBA99n' 1141 ); 1142 1143 assert.sameValue( 1144 -0x2n + -0xFEDCBA98n, 1145 -0xFEDCBA9An, 1146 'The result of (-0x2n + -0xFEDCBA98n) is -0xFEDCBA9An' 1147 ); 1148 1149 assert.sameValue( 1150 -0x2n + -0xFEDCBA98n, 1151 -0xFEDCBA9An, 1152 'The result of (-0x2n + -0xFEDCBA98n) is -0xFEDCBA9An' 1153 ); 1154 1155 assert.sameValue( 1156 -0x2n + -0xFEDCBA987654320Fn, 1157 -0xFEDCBA9876543211n, 1158 'The result of (-0x2n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876543211n' 1159 ); 1160 1161 assert.sameValue( 1162 -0x2n + -0xFEDCBA987654320Fn, 1163 -0xFEDCBA9876543211n, 1164 'The result of (-0x2n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876543211n' 1165 ); 1166 1167 assert.sameValue( 1168 -0x2n + -0xFEDCBA9876543210n, 1169 -0xFEDCBA9876543212n, 1170 'The result of (-0x2n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543212n' 1171 ); 1172 1173 assert.sameValue( 1174 -0x2n + -0xFEDCBA9876543210n, 1175 -0xFEDCBA9876543212n, 1176 'The result of (-0x2n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543212n' 1177 ); 1178 1179 assert.sameValue(-0x3n + -0x3n, -0x6n, 'The result of (-0x3n + -0x3n) is -0x6n'); 1180 assert.sameValue(-0x3n + -0x3n, -0x6n, 'The result of (-0x3n + -0x3n) is -0x6n'); 1181 assert.sameValue(-0x3n + -0x1234n, -0x1237n, 'The result of (-0x3n + -0x1234n) is -0x1237n'); 1182 assert.sameValue(-0x3n + -0x1234n, -0x1237n, 'The result of (-0x3n + -0x1234n) is -0x1237n'); 1183 1184 assert.sameValue( 1185 -0x3n + -0xFEDCBA97n, 1186 -0xFEDCBA9An, 1187 'The result of (-0x3n + -0xFEDCBA97n) is -0xFEDCBA9An' 1188 ); 1189 1190 assert.sameValue( 1191 -0x3n + -0xFEDCBA97n, 1192 -0xFEDCBA9An, 1193 'The result of (-0x3n + -0xFEDCBA97n) is -0xFEDCBA9An' 1194 ); 1195 1196 assert.sameValue( 1197 -0x3n + -0xFEDCBA98n, 1198 -0xFEDCBA9Bn, 1199 'The result of (-0x3n + -0xFEDCBA98n) is -0xFEDCBA9Bn' 1200 ); 1201 1202 assert.sameValue( 1203 -0x3n + -0xFEDCBA98n, 1204 -0xFEDCBA9Bn, 1205 'The result of (-0x3n + -0xFEDCBA98n) is -0xFEDCBA9Bn' 1206 ); 1207 1208 assert.sameValue( 1209 -0x3n + -0xFEDCBA987654320Fn, 1210 -0xFEDCBA9876543212n, 1211 'The result of (-0x3n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876543212n' 1212 ); 1213 1214 assert.sameValue( 1215 -0x3n + -0xFEDCBA987654320Fn, 1216 -0xFEDCBA9876543212n, 1217 'The result of (-0x3n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876543212n' 1218 ); 1219 1220 assert.sameValue( 1221 -0x3n + -0xFEDCBA9876543210n, 1222 -0xFEDCBA9876543213n, 1223 'The result of (-0x3n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543213n' 1224 ); 1225 1226 assert.sameValue( 1227 -0x3n + -0xFEDCBA9876543210n, 1228 -0xFEDCBA9876543213n, 1229 'The result of (-0x3n + -0xFEDCBA9876543210n) is -0xFEDCBA9876543213n' 1230 ); 1231 1232 assert.sameValue(-0x1234n + -0x1234n, -0x2468n, 'The result of (-0x1234n + -0x1234n) is -0x2468n'); 1233 assert.sameValue(-0x1234n + -0x1234n, -0x2468n, 'The result of (-0x1234n + -0x1234n) is -0x2468n'); 1234 1235 assert.sameValue( 1236 -0x1234n + -0xFEDCBA97n, 1237 -0xFEDCCCCBn, 1238 'The result of (-0x1234n + -0xFEDCBA97n) is -0xFEDCCCCBn' 1239 ); 1240 1241 assert.sameValue( 1242 -0x1234n + -0xFEDCBA97n, 1243 -0xFEDCCCCBn, 1244 'The result of (-0x1234n + -0xFEDCBA97n) is -0xFEDCCCCBn' 1245 ); 1246 1247 assert.sameValue( 1248 -0x1234n + -0xFEDCBA98n, 1249 -0xFEDCCCCCn, 1250 'The result of (-0x1234n + -0xFEDCBA98n) is -0xFEDCCCCCn' 1251 ); 1252 1253 assert.sameValue( 1254 -0x1234n + -0xFEDCBA98n, 1255 -0xFEDCCCCCn, 1256 'The result of (-0x1234n + -0xFEDCBA98n) is -0xFEDCCCCCn' 1257 ); 1258 1259 assert.sameValue( 1260 -0x1234n + -0xFEDCBA987654320Fn, 1261 -0xFEDCBA9876544443n, 1262 'The result of (-0x1234n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876544443n' 1263 ); 1264 1265 assert.sameValue( 1266 -0x1234n + -0xFEDCBA987654320Fn, 1267 -0xFEDCBA9876544443n, 1268 'The result of (-0x1234n + -0xFEDCBA987654320Fn) is -0xFEDCBA9876544443n' 1269 ); 1270 1271 assert.sameValue( 1272 -0x1234n + -0xFEDCBA9876543210n, 1273 -0xFEDCBA9876544444n, 1274 'The result of (-0x1234n + -0xFEDCBA9876543210n) is -0xFEDCBA9876544444n' 1275 ); 1276 1277 assert.sameValue( 1278 -0x1234n + -0xFEDCBA9876543210n, 1279 -0xFEDCBA9876544444n, 1280 'The result of (-0x1234n + -0xFEDCBA9876543210n) is -0xFEDCBA9876544444n' 1281 ); 1282 1283 assert.sameValue( 1284 -0xFEDCBA97n + -0xFEDCBA97n, 1285 -0x1FDB9752En, 1286 'The result of (-0xFEDCBA97n + -0xFEDCBA97n) is -0x1FDB9752En' 1287 ); 1288 1289 assert.sameValue( 1290 -0xFEDCBA97n + -0xFEDCBA97n, 1291 -0x1FDB9752En, 1292 'The result of (-0xFEDCBA97n + -0xFEDCBA97n) is -0x1FDB9752En' 1293 ); 1294 1295 assert.sameValue( 1296 -0xFEDCBA97n + -0xFEDCBA98n, 1297 -0x1FDB9752Fn, 1298 'The result of (-0xFEDCBA97n + -0xFEDCBA98n) is -0x1FDB9752Fn' 1299 ); 1300 1301 assert.sameValue( 1302 -0xFEDCBA97n + -0xFEDCBA98n, 1303 -0x1FDB9752Fn, 1304 'The result of (-0xFEDCBA97n + -0xFEDCBA98n) is -0x1FDB9752Fn' 1305 ); 1306 1307 assert.sameValue( 1308 -0xFEDCBA97n + -0xFEDCBA987654320Fn, 1309 -0xFEDCBA997530ECA6n, 1310 'The result of (-0xFEDCBA97n + -0xFEDCBA987654320Fn) is -0xFEDCBA997530ECA6n' 1311 ); 1312 1313 assert.sameValue( 1314 -0xFEDCBA97n + -0xFEDCBA987654320Fn, 1315 -0xFEDCBA997530ECA6n, 1316 'The result of (-0xFEDCBA97n + -0xFEDCBA987654320Fn) is -0xFEDCBA997530ECA6n' 1317 ); 1318 1319 assert.sameValue( 1320 -0xFEDCBA97n + -0xFEDCBA9876543210n, 1321 -0xFEDCBA997530ECA7n, 1322 'The result of (-0xFEDCBA97n + -0xFEDCBA9876543210n) is -0xFEDCBA997530ECA7n' 1323 ); 1324 1325 assert.sameValue( 1326 -0xFEDCBA97n + -0xFEDCBA9876543210n, 1327 -0xFEDCBA997530ECA7n, 1328 'The result of (-0xFEDCBA97n + -0xFEDCBA9876543210n) is -0xFEDCBA997530ECA7n' 1329 ); 1330 1331 assert.sameValue( 1332 -0xFEDCBA98n + -0xFEDCBA98n, 1333 -0x1FDB97530n, 1334 'The result of (-0xFEDCBA98n + -0xFEDCBA98n) is -0x1FDB97530n' 1335 ); 1336 1337 assert.sameValue( 1338 -0xFEDCBA98n + -0xFEDCBA98n, 1339 -0x1FDB97530n, 1340 'The result of (-0xFEDCBA98n + -0xFEDCBA98n) is -0x1FDB97530n' 1341 ); 1342 1343 assert.sameValue( 1344 -0xFEDCBA98n + -0xFEDCBA987654320Fn, 1345 -0xFEDCBA997530ECA7n, 1346 'The result of (-0xFEDCBA98n + -0xFEDCBA987654320Fn) is -0xFEDCBA997530ECA7n' 1347 ); 1348 1349 assert.sameValue( 1350 -0xFEDCBA98n + -0xFEDCBA987654320Fn, 1351 -0xFEDCBA997530ECA7n, 1352 'The result of (-0xFEDCBA98n + -0xFEDCBA987654320Fn) is -0xFEDCBA997530ECA7n' 1353 ); 1354 1355 assert.sameValue( 1356 -0xFEDCBA98n + -0xFEDCBA9876543210n, 1357 -0xFEDCBA997530ECA8n, 1358 'The result of (-0xFEDCBA98n + -0xFEDCBA9876543210n) is -0xFEDCBA997530ECA8n' 1359 ); 1360 1361 assert.sameValue( 1362 -0xFEDCBA98n + -0xFEDCBA9876543210n, 1363 -0xFEDCBA997530ECA8n, 1364 'The result of (-0xFEDCBA98n + -0xFEDCBA9876543210n) is -0xFEDCBA997530ECA8n' 1365 ); 1366 1367 assert.sameValue( 1368 -0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn, 1369 -0x1FDB97530ECA8641En, 1370 'The result of (-0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn) is -0x1FDB97530ECA8641En' 1371 ); 1372 1373 assert.sameValue( 1374 -0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn, 1375 -0x1FDB97530ECA8641En, 1376 'The result of (-0xFEDCBA987654320Fn + -0xFEDCBA987654320Fn) is -0x1FDB97530ECA8641En' 1377 ); 1378 1379 assert.sameValue( 1380 -0xFEDCBA987654320Fn + -0xFEDCBA9876543210n, 1381 -0x1FDB97530ECA8641Fn, 1382 'The result of (-0xFEDCBA987654320Fn + -0xFEDCBA9876543210n) is -0x1FDB97530ECA8641Fn' 1383 ); 1384 1385 assert.sameValue( 1386 -0xFEDCBA987654320Fn + -0xFEDCBA9876543210n, 1387 -0x1FDB97530ECA8641Fn, 1388 'The result of (-0xFEDCBA987654320Fn + -0xFEDCBA9876543210n) is -0x1FDB97530ECA8641Fn' 1389 ); 1390 1391 assert.sameValue( 1392 -0xFEDCBA9876543210n + -0xFEDCBA9876543210n, 1393 -0x1FDB97530ECA86420n, 1394 'The result of (-0xFEDCBA9876543210n + -0xFEDCBA9876543210n) is -0x1FDB97530ECA86420n' 1395 ); 1396 1397 assert.sameValue( 1398 -0xFEDCBA9876543210n + -0xFEDCBA9876543210n, 1399 -0x1FDB97530ECA86420n, 1400 'The result of (-0xFEDCBA9876543210n + -0xFEDCBA9876543210n) is -0x1FDB97530ECA86420n' 1401 ); 1402 1403 reportCompare(0, 0);