summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorDaniel Schwierzeck <daniel.schwierzeck@googlemail.com>2011-07-13 05:11:01 +0000
committerWolfgang Denk <wd@denx.de>2011-07-26 14:41:43 +0200
commit4e0fbb98fcca8cee2995debc554fa98d59adefb0 (patch)
treebaf1b11d128e7e0b3c1011133429b457c282728a /board
parenta16a84b7258c4fb9d320372543ea691a01e2adf9 (diff)
downloadu-boot-4e0fbb98fcca8cee2995debc554fa98d59adefb0.tar.gz
u-boot-4e0fbb98fcca8cee2995debc554fa98d59adefb0.tar.xz
u-boot-4e0fbb98fcca8cee2995debc554fa98d59adefb0.zip
Use ALL-y style instead of ifeq blocks for better readability
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Diffstat (limited to 'board')
-rw-r--r--board/pcs440ep/config.mk2
-rw-r--r--board/spear/spear300/config.mk2
-rw-r--r--board/spear/spear310/config.mk2
-rw-r--r--board/spear/spear320/config.mk2
-rw-r--r--board/spear/spear600/config.mk2
5 files changed, 5 insertions, 5 deletions
diff --git a/board/pcs440ep/config.mk b/board/pcs440ep/config.mk
index 23631c510b..f560ec639f 100644
--- a/board/pcs440ep/config.mk
+++ b/board/pcs440ep/config.mk
@@ -26,7 +26,7 @@
#
# Check the U-Boot Image with a SHA1 checksum
-ALL += $(obj)u-boot.sha1
+ALL-y += $(obj)u-boot.sha1
PLATFORM_CPPFLAGS += -DCONFIG_440=1
diff --git a/board/spear/spear300/config.mk b/board/spear/spear300/config.mk
index 11da2c3338..5848ef89f8 100644
--- a/board/spear/spear300/config.mk
+++ b/board/spear/spear300/config.mk
@@ -25,7 +25,7 @@
CONFIG_SYS_TEXT_BASE = 0x00700000
-ALL += $(obj)u-boot.img
+ALL-y += $(obj)u-boot.img
# Environment variables in NAND
ifeq ($(ENV),NAND)
diff --git a/board/spear/spear310/config.mk b/board/spear/spear310/config.mk
index 2b59c39e7a..f8a6bdb976 100644
--- a/board/spear/spear310/config.mk
+++ b/board/spear/spear310/config.mk
@@ -25,7 +25,7 @@
CONFIG_SYS_TEXT_BASE = 0x00700000
-ALL += $(obj)u-boot.img
+ALL-y += $(obj)u-boot.img
# Environment variables in NAND
ifeq ($(ENV),NAND)
diff --git a/board/spear/spear320/config.mk b/board/spear/spear320/config.mk
index 2b59c39e7a..f8a6bdb976 100644
--- a/board/spear/spear320/config.mk
+++ b/board/spear/spear320/config.mk
@@ -25,7 +25,7 @@
CONFIG_SYS_TEXT_BASE = 0x00700000
-ALL += $(obj)u-boot.img
+ALL-y += $(obj)u-boot.img
# Environment variables in NAND
ifeq ($(ENV),NAND)
diff --git a/board/spear/spear600/config.mk b/board/spear/spear600/config.mk
index 11da2c3338..5848ef89f8 100644
--- a/board/spear/spear600/config.mk
+++ b/board/spear/spear600/config.mk
@@ -25,7 +25,7 @@
CONFIG_SYS_TEXT_BASE = 0x00700000
-ALL += $(obj)u-boot.img
+ALL-y += $(obj)u-boot.img
# Environment variables in NAND
ifeq ($(ENV),NAND)
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735
require 'test/unit'

class Complex_Test2 < Test::Unit::TestCase

  def test_kumi
    return unless defined?(Rational)

    assert_equal(Complex(1, 0), +Complex(1, 0))
    assert_equal(Complex(-1, 0), -Complex(1, 0))
    assert_equal(Complex(2, 0),
                 Complex(1, 0) + Complex(1, 0))
    assert_equal(Complex(0, 0),
                 Complex(1, 0) - Complex(1, 0))
    assert_equal(Complex(1, 0),
                 Complex(1, 0) * Complex(1, 0))
    assert_equal(Complex(1, 0),
                 Complex(1, 0) / Complex(1, 0))
    assert_equal(Complex(1073741790, 0),
                 Complex(1, 0) + Complex(1073741789, 0))
    assert_equal(Complex(-1073741788, 0),
                 Complex(1, 0) - Complex(1073741789, 0))
    assert_equal(Complex(1073741789, 0),
                 Complex(1, 0) * Complex(1073741789, 0))
    assert_equal(Complex(Rational(1, 1073741789), 0),
                 Complex(1, 0) / Complex(1073741789, 0))
    assert_equal(Complex(1073741828, 0),
                 Complex(1, 0) + Complex(1073741827, 0))
    assert_equal(Complex(-1073741826, 0),
                 Complex(1, 0) - Complex(1073741827, 0))
    assert_equal(Complex(1073741827, 0),
                 Complex(1, 0) * Complex(1073741827, 0))
    assert_equal(Complex(Rational(1, 1073741827), 0),
                 Complex(1, 0) / Complex(1073741827, 0))
    assert_equal(Complex(1073741790, 1073741789),
                 Complex(1, 0) + Complex(1073741789, 1073741789))
    assert_equal(Complex(-1073741788, -1073741789),
                 Complex(1, 0) - Complex(1073741789, 1073741789))
    assert_equal(Complex(1073741789, 1073741789),
                 Complex(1, 0) * Complex(1073741789, 1073741789))
    assert_equal(Complex(Rational(1, 2147483578), Rational(-1, 2147483578)),
                 Complex(1, 0) / Complex(1073741789, 1073741789))
    assert_equal(Complex(1073741790, 1073741827),
                 Complex(1, 0) + Complex(1073741789, 1073741827))
    assert_equal(Complex(-1073741788, -1073741827),
                 Complex(1, 0) - Complex(1073741789, 1073741827))
    assert_equal(Complex(1073741789, 1073741827),
                 Complex(1, 0) * Complex(1073741789, 1073741827))
    assert_equal(Complex(Rational(1073741789, 2305842940494218450), Rational(-1073741827, 2305842940494218450)),
                 Complex(1, 0) / Complex(1073741789, 1073741827))
    assert_equal(Complex(1073741828, 1073741827),
                 Complex(1, 0) + Complex(1073741827, 1073741827))
    assert_equal(Complex(-1073741826, -1073741827),
                 Complex(1, 0) - Complex(1073741827, 1073741827))
    assert_equal(Complex(1073741827, 1073741827),
                 Complex(1, 0) * Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(1, 2147483654), Rational(-1, 2147483654)),
                 Complex(1, 0) / Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(2147483616, 1073741827), Rational(1073741789, 1073741827)),
                 Complex(1, 0) + Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(38, 1073741827), Rational(-1073741789, 1073741827)),
                 Complex(1, 0) - Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)),
                 Complex(1, 0) * Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1073741827, 2147483578), Rational(-1073741827, 2147483578)),
                 Complex(1, 0) / Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(2147483616, 1073741789), Rational(1073741827, 1073741789)),
                 Complex(1, 0) + Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(-38, 1073741789), Rational(-1073741827, 1073741789)),
                 Complex(1, 0) - Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)),
                 Complex(1, 0) * Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1073741789, 2147483654), Rational(-1073741789, 2147483654)),
                 Complex(1, 0) / Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(2147483616, 1073741827), Rational(1073741827, 1073741789)),
                 Complex(1, 0) + Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(38, 1073741827), Rational(-1073741827, 1073741789)),
                 Complex(1, 0) - Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)),
                 Complex(1, 0) * Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1329227869515035739611240300898290063, 2658455833113515253509575011810600482), Rational(-1329227963598474519442525600436190287, 2658455833113515253509575011810600482)),
                 Complex(1, 0) / Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(1073741789, 0), +Complex(1073741789, 0))
    assert_equal(Complex(-1073741789, 0), -Complex(1073741789, 0))
    assert_equal(Complex(1073741790, 0),
                 Complex(1073741789, 0) + Complex(1, 0))
    assert_equal(Complex(1073741788, 0),
                 Complex(1073741789, 0) - Complex(1, 0))
    assert_equal(Complex(1073741789, 0),
                 Complex(1073741789, 0) * Complex(1, 0))
    assert_equal(Complex(1073741789, 0),
                 Complex(1073741789, 0) / Complex(1, 0))
    assert_equal(Complex(2147483578, 0),
                 Complex(1073741789, 0) + Complex(1073741789, 0))
    assert_equal(Complex(0, 0),
                 Complex(1073741789, 0) - Complex(1073741789, 0))
    assert_equal(Complex(1152921429444920521, 0),
                 Complex(1073741789, 0) * Complex(1073741789, 0))
    assert_equal(Complex(1, 0),
                 Complex(1073741789, 0) / Complex(1073741789, 0))
    assert_equal(Complex(2147483616, 0),
                 Complex(1073741789, 0) + Complex(1073741827, 0))
    assert_equal(Complex(-38, 0),
                 Complex(1073741789, 0) - Complex(1073741827, 0))
    assert_equal(Complex(1152921470247108503, 0),
                 Complex(1073741789, 0) * Complex(1073741827, 0))
    assert_equal(Complex(Rational(1073741789, 1073741827), 0),
                 Complex(1073741789, 0) / Complex(1073741827, 0))
    assert_equal(Complex(2147483578, 1073741789),
                 Complex(1073741789, 0) + Complex(1073741789, 1073741789))
    assert_equal(Complex(0, -1073741789),
                 Complex(1073741789, 0) - Complex(1073741789, 1073741789))
    assert_equal(Complex(1152921429444920521, 1152921429444920521),
                 Complex(1073741789, 0) * Complex(1073741789, 1073741789))
    assert_equal(Complex(Rational(1, 2), Rational(-1, 2)),
                 Complex(1073741789, 0) / Complex(1073741789, 1073741789))
    assert_equal(Complex(2147483578, 1073741827),
                 Complex(1073741789, 0) + Complex(1073741789, 1073741827))
    assert_equal(Complex(0, -1073741827),
                 Complex(1073741789, 0) - Complex(1073741789, 1073741827))
    assert_equal(Complex(1152921429444920521, 1152921470247108503),
                 Complex(1073741789, 0) * Complex(1073741789, 1073741827))
    assert_equal(Complex(Rational(1152921429444920521, 2305842940494218450), Rational(-1152921470247108503, 2305842940494218450)),
                 Complex(1073741789, 0) / Complex(1073741789, 1073741827))
    assert_equal(Complex(2147483616, 1073741827),
                 Complex(1073741789, 0) + Complex(1073741827, 1073741827))
    assert_equal(Complex(-38, -1073741827),
                 Complex(1073741789, 0) - Complex(1073741827, 1073741827))
    assert_equal(Complex(1152921470247108503, 1152921470247108503),
                 Complex(1073741789, 0) * Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(1073741789, 2147483654), Rational(-1073741789, 2147483654)),
                 Complex(1073741789, 0) / Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(1152921471320850292, 1073741827), Rational(1073741789, 1073741827)),
                 Complex(1073741789, 0) + Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921469173366714, 1073741827), Rational(-1073741789, 1073741827)),
                 Complex(1073741789, 0) - Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921429444920521, 1073741827), Rational(1152921429444920521, 1073741827)),
                 Complex(1073741789, 0) * Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1073741827, 2), Rational(-1073741827, 2)),
                 Complex(1073741789, 0) / Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921430518662348, 1073741789), Rational(1073741827, 1073741789)),
                 Complex(1073741789, 0) + Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921428371178694, 1073741789), Rational(-1073741827, 1073741789)),
                 Complex(1073741789, 0) - Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(1073741827, 1073741827),
                 Complex(1073741789, 0) * Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921429444920521, 2147483654), Rational(-1152921429444920521, 2147483654)),
                 Complex(1073741789, 0) / Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921471320850292, 1073741827), Rational(1073741827, 1073741789)),
                 Complex(1073741789, 0) + Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921469173366714, 1073741827), Rational(-1073741827, 1073741789)),
                 Complex(1073741789, 0) - Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921429444920521, 1073741827), 1073741827),
                 Complex(1073741789, 0) * Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1427247510601733037449111325195428279286542707, 2658455833113515253509575011810600482), Rational(-1427247611623052908177132720890654139107803443, 2658455833113515253509575011810600482)),
                 Complex(1073741789, 0) / Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(1073741827, 0), +Complex(1073741827, 0))
    assert_equal(Complex(-1073741827, 0), -Complex(1073741827, 0))
    assert_equal(Complex(1073741828, 0),
                 Complex(1073741827, 0) + Complex(1, 0))
    assert_equal(Complex(1073741826, 0),
                 Complex(1073741827, 0) - Complex(1, 0))
    assert_equal(Complex(1073741827, 0),
                 Complex(1073741827, 0) * Complex(1, 0))
    assert_equal(Complex(1073741827, 0),
                 Complex(1073741827, 0) / Complex(1, 0))
    assert_equal(Complex(2147483616, 0),
                 Complex(1073741827, 0) + Complex(1073741789, 0))
    assert_equal(Complex(38, 0),
                 Complex(1073741827, 0) - Complex(1073741789, 0))
    assert_equal(Complex(1152921470247108503, 0),
                 Complex(1073741827, 0) * Complex(1073741789, 0))
    assert_equal(Complex(Rational(1073741827, 1073741789), 0),
                 Complex(1073741827, 0) / Complex(1073741789, 0))
    assert_equal(Complex(2147483654, 0),
                 Complex(1073741827, 0) + Complex(1073741827, 0))
    assert_equal(Complex(0, 0),
                 Complex(1073741827, 0) - Complex(1073741827, 0))
    assert_equal(Complex(1152921511049297929, 0),
                 Complex(1073741827, 0) * Complex(1073741827, 0))
    assert_equal(Complex(1, 0),
                 Complex(1073741827, 0) / Complex(1073741827, 0))
    assert_equal(Complex(2147483616, 1073741789),
                 Complex(1073741827, 0) + Complex(1073741789, 1073741789))
    assert_equal(Complex(38, -1073741789),
                 Complex(1073741827, 0) - Complex(1073741789, 1073741789))
    assert_equal(Complex(1152921470247108503, 1152921470247108503),
                 Complex(1073741827, 0) * Complex(1073741789, 1073741789))
    assert_equal(Complex(Rational(1073741827, 2147483578), Rational(-1073741827, 2147483578)),
                 Complex(1073741827, 0) / Complex(1073741789, 1073741789))
    assert_equal(Complex(2147483616, 1073741827),
                 Complex(1073741827, 0) + Complex(1073741789, 1073741827))
    assert_equal(Complex(38, -1073741827),
                 Complex(1073741827, 0) - Complex(1073741789, 1073741827))
    assert_equal(Complex(1152921470247108503, 1152921511049297929),
                 Complex(1073741827, 0) * Complex(1073741789, 1073741827))
    assert_equal(Complex(Rational(1152921470247108503, 2305842940494218450), Rational(-1152921511049297929, 2305842940494218450)),
                 Complex(1073741827, 0) / Complex(1073741789, 1073741827))
    assert_equal(Complex(2147483654, 1073741827),
                 Complex(1073741827, 0) + Complex(1073741827, 1073741827))
    assert_equal(Complex(0, -1073741827),
                 Complex(1073741827, 0) - Complex(1073741827, 1073741827))
    assert_equal(Complex(1152921511049297929, 1152921511049297929),
                 Complex(1073741827, 0) * Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(1, 2), Rational(-1, 2)),
                 Complex(1073741827, 0) / Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(1152921512123039718, 1073741827), Rational(1073741789, 1073741827)),
                 Complex(1073741827, 0) + Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921509975556140, 1073741827), Rational(-1073741789, 1073741827)),
                 Complex(1073741827, 0) - Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(1073741789, 1073741789),
                 Complex(1073741827, 0) * Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921511049297929, 2147483578), Rational(-1152921511049297929, 2147483578)),
                 Complex(1073741827, 0) / Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921471320850330, 1073741789), Rational(1073741827, 1073741789)),
                 Complex(1073741827, 0) + Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921469173366676, 1073741789), Rational(-1073741827, 1073741789)),
                 Complex(1073741827, 0) - Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921511049297929, 1073741789), Rational(1152921511049297929, 1073741789)),
                 Complex(1073741827, 0) * Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1073741789, 2), Rational(-1073741789, 2)),
                 Complex(1073741827, 0) / Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921512123039718, 1073741827), Rational(1073741827, 1073741789)),
                 Complex(1073741827, 0) + Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921509975556140, 1073741827), Rational(-1073741827, 1073741789)),
                 Complex(1073741827, 0) - Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(1073741789, Rational(1152921511049297929, 1073741789)),
                 Complex(1073741827, 0) * Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1427247561112392079020469430422559713421565101, 2658455833113515253509575011810600482), Rational(-1427247662133715524919164459706626955683034349, 2658455833113515253509575011810600482)),
                 Complex(1073741827, 0) / Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(1073741789, 1073741789), +Complex(1073741789, 1073741789))
    assert_equal(Complex(-1073741789, -1073741789), -Complex(1073741789, 1073741789))
    assert_equal(Complex(1073741790, 1073741789),
                 Complex(1073741789, 1073741789) + Complex(1, 0))
    assert_equal(Complex(1073741788, 1073741789),
                 Complex(1073741789, 1073741789) - Complex(1, 0))
    assert_equal(Complex(1073741789, 1073741789),
                 Complex(1073741789, 1073741789) * Complex(1, 0))
    assert_equal(Complex(1073741789, 1073741789),
                 Complex(1073741789, 1073741789) / Complex(1, 0))
    assert_equal(Complex(2147483578, 1073741789),
                 Complex(1073741789, 1073741789) + Complex(1073741789, 0))
    assert_equal(Complex(0, 1073741789),
                 Complex(1073741789, 1073741789) - Complex(1073741789, 0))
    assert_equal(Complex(1152921429444920521, 1152921429444920521),
                 Complex(1073741789, 1073741789) * Complex(1073741789, 0))
    assert_equal(Complex(1, 1),
                 Complex(1073741789, 1073741789) / Complex(1073741789, 0))
    assert_equal(Complex(2147483616, 1073741789),
                 Complex(1073741789, 1073741789) + Complex(1073741827, 0))
    assert_equal(Complex(-38, 1073741789),
                 Complex(1073741789, 1073741789) - Complex(1073741827, 0))
    assert_equal(Complex(1152921470247108503, 1152921470247108503),
                 Complex(1073741789, 1073741789) * Complex(1073741827, 0))
    assert_equal(Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)),
                 Complex(1073741789, 1073741789) / Complex(1073741827, 0))
    assert_equal(Complex(2147483578, 2147483578),
                 Complex(1073741789, 1073741789) + Complex(1073741789, 1073741789))
    assert_equal(Complex(0, 0),
                 Complex(1073741789, 1073741789) - Complex(1073741789, 1073741789))
    assert_equal(Complex(0, 2305842858889841042),
                 Complex(1073741789, 1073741789) * Complex(1073741789, 1073741789))
    assert_equal(Complex(1, 0),
                 Complex(1073741789, 1073741789) / Complex(1073741789, 1073741789))
    assert_equal(Complex(2147483578, 2147483616),
                 Complex(1073741789, 1073741789) + Complex(1073741789, 1073741827))
    assert_equal(Complex(0, -38),
                 Complex(1073741789, 1073741789) - Complex(1073741789, 1073741827))
    assert_equal(Complex(-40802187982, 2305842899692029024),
                 Complex(1073741789, 1073741789) * Complex(1073741789, 1073741827))
    assert_equal(Complex(Rational(1152921449846014512, 1152921470247109225), Rational(-20401093991, 1152921470247109225)),
                 Complex(1073741789, 1073741789) / Complex(1073741789, 1073741827))
    assert_equal(Complex(2147483616, 2147483616),
                 Complex(1073741789, 1073741789) + Complex(1073741827, 1073741827))
    assert_equal(Complex(-38, -38),
                 Complex(1073741789, 1073741789) - Complex(1073741827, 1073741827))
    assert_equal(Complex(0, 2305842940494217006),
                 Complex(1073741789, 1073741789) * Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(1073741789, 1073741827), 0),
                 Complex(1073741789, 1073741789) / Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(1152921471320850292, 1073741827), Rational(1152921471320850292, 1073741827)),
                 Complex(1073741789, 1073741789) + Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921469173366714, 1073741827), Rational(1152921469173366714, 1073741827)),
                 Complex(1073741789, 1073741789) - Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(0, Rational(2305842858889841042, 1073741827)),
                 Complex(1073741789, 1073741789) * Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(1073741827, 0),
                 Complex(1073741789, 1073741789) / Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921430518662348, 1073741789), Rational(1152921430518662348, 1073741789)),
                 Complex(1073741789, 1073741789) + Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921428371178694, 1073741789), Rational(1152921428371178694, 1073741789)),
                 Complex(1073741789, 1073741789) - Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(0, 2147483654),
                 Complex(1073741789, 1073741789) * Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921429444920521, 1073741827), 0),
                 Complex(1073741789, 1073741789) / Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921471320850292, 1073741827), Rational(1152921430518662348, 1073741789)),
                 Complex(1073741789, 1073741789) + Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921469173366714, 1073741827), Rational(1152921428371178694, 1073741789)),
                 Complex(1073741789, 1073741789) - Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(-81604377408, 1073741827), Rational(2305842940494218450, 1073741827)),
                 Complex(1073741789, 1073741789) * Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1427247561112392972813122023043041209197173075, 1329227916556757626754787505905300241), Rational(-50510659935364010697847612929910630368, 1329227916556757626754787505905300241)),
                 Complex(1073741789, 1073741789) / Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(1073741789, 1073741827), +Complex(1073741789, 1073741827))
    assert_equal(Complex(-1073741789, -1073741827), -Complex(1073741789, 1073741827))
    assert_equal(Complex(1073741790, 1073741827),
                 Complex(1073741789, 1073741827) + Complex(1, 0))
    assert_equal(Complex(1073741788, 1073741827),
                 Complex(1073741789, 1073741827) - Complex(1, 0))
    assert_equal(Complex(1073741789, 1073741827),
                 Complex(1073741789, 1073741827) * Complex(1, 0))
    assert_equal(Complex(1073741789, 1073741827),
                 Complex(1073741789, 1073741827) / Complex(1, 0))
    assert_equal(Complex(2147483578, 1073741827),
                 Complex(1073741789, 1073741827) + Complex(1073741789, 0))
    assert_equal(Complex(0, 1073741827),
                 Complex(1073741789, 1073741827) - Complex(1073741789, 0))
    assert_equal(Complex(1152921429444920521, 1152921470247108503),
                 Complex(1073741789, 1073741827) * Complex(1073741789, 0))
    assert_equal(Complex(1, Rational(1073741827, 1073741789)),
                 Complex(1073741789, 1073741827) / Complex(1073741789, 0))
    assert_equal(Complex(2147483616, 1073741827),
                 Complex(1073741789, 1073741827) + Complex(1073741827, 0))
    assert_equal(Complex(-38, 1073741827),
                 Complex(1073741789, 1073741827) - Complex(1073741827, 0))
    assert_equal(Complex(1152921470247108503, 1152921511049297929),
                 Complex(1073741789, 1073741827) * Complex(1073741827, 0))
    assert_equal(Complex(Rational(1073741789, 1073741827), 1),
                 Complex(1073741789, 1073741827) / Complex(1073741827, 0))
    assert_equal(Complex(2147483578, 2147483616),
                 Complex(1073741789, 1073741827) + Complex(1073741789, 1073741789))
    assert_equal(Complex(0, 38),
                 Complex(1073741789, 1073741827) - Complex(1073741789, 1073741789))
    assert_equal(Complex(-40802187982, 2305842899692029024),
                 Complex(1073741789, 1073741827) * Complex(1073741789, 1073741789))
    assert_equal(Complex(Rational(1073741808, 1073741789), Rational(19, 1073741789)),
                 Complex(1073741789, 1073741827) / Complex(1073741789, 1073741789))
    assert_equal(Complex(2147483578, 2147483654),
                 Complex(1073741789, 1073741827) + Complex(1073741789, 1073741827))
    assert_equal(Complex(0, 0),
                 Complex(1073741789, 1073741827) - Complex(1073741789, 1073741827))
    assert_equal(Complex(-81604377408, 2305842940494217006),
                 Complex(1073741789, 1073741827) * Complex(1073741789, 1073741827))
    assert_equal(Complex(1, 0),
                 Complex(1073741789, 1073741827) / Complex(1073741789, 1073741827))
    assert_equal(Complex(2147483616, 2147483654),
                 Complex(1073741789, 1073741827) + Complex(1073741827, 1073741827))
    assert_equal(Complex(-38, 0),
                 Complex(1073741789, 1073741827) - Complex(1073741827, 1073741827))
    assert_equal(Complex(-40802189426, 2305842981296406432),
                 Complex(1073741789, 1073741827) * Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(1073741808, 1073741827), Rational(19, 1073741827)),
                 Complex(1073741789, 1073741827) / Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(1152921471320850292, 1073741827), Rational(1152921512123039718, 1073741827)),
                 Complex(1073741789, 1073741827) + Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921469173366714, 1073741827), Rational(1152921509975556140, 1073741827)),
                 Complex(1073741789, 1073741827) - Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(-40802187982, 1073741827), Rational(2305842899692029024, 1073741827)),
                 Complex(1073741789, 1073741827) * Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921490648203216, 1073741789), Rational(20401094713, 1073741789)),
                 Complex(1073741789, 1073741827) / Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921430518662348, 1073741789), Rational(1152921471320850330, 1073741789)),
                 Complex(1073741789, 1073741827) + Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921428371178694, 1073741789), Rational(1152921469173366676, 1073741789)),
                 Complex(1073741789, 1073741827) - Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(-40802189426, 1073741789), Rational(2305842981296406432, 1073741789)),
                 Complex(1073741789, 1073741827) * Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921449846014512, 1073741827), Rational(20401093991, 1073741827)),
                 Complex(1073741789, 1073741827) / Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921471320850292, 1073741827), Rational(1152921471320850330, 1073741789)),
                 Complex(1073741789, 1073741827) + Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921469173366714, 1073741827), Rational(1152921469173366676, 1073741789)),
                 Complex(1073741789, 1073741827) - Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(-131433047608170424214, 1152921470247108503), 2147483616),
                 Complex(1073741789, 1073741827) * Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1427247586367724281184137892451027617484788528, 1329227916556757626754787505905300241), Rational(-25255330414578331645234047212843119171, 1329227916556757626754787505905300241)),
                 Complex(1073741789, 1073741827) / Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(1073741827, 1073741827), +Complex(1073741827, 1073741827))
    assert_equal(Complex(-1073741827, -1073741827), -Complex(1073741827, 1073741827))
    assert_equal(Complex(1073741828, 1073741827),
                 Complex(1073741827, 1073741827) + Complex(1, 0))
    assert_equal(Complex(1073741826, 1073741827),
                 Complex(1073741827, 1073741827) - Complex(1, 0))
    assert_equal(Complex(1073741827, 1073741827),
                 Complex(1073741827, 1073741827) * Complex(1, 0))
    assert_equal(Complex(1073741827, 1073741827),
                 Complex(1073741827, 1073741827) / Complex(1, 0))
    assert_equal(Complex(2147483616, 1073741827),
                 Complex(1073741827, 1073741827) + Complex(1073741789, 0))
    assert_equal(Complex(38, 1073741827),
                 Complex(1073741827, 1073741827) - Complex(1073741789, 0))
    assert_equal(Complex(1152921470247108503, 1152921470247108503),
                 Complex(1073741827, 1073741827) * Complex(1073741789, 0))
    assert_equal(Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)),
                 Complex(1073741827, 1073741827) / Complex(1073741789, 0))
    assert_equal(Complex(2147483654, 1073741827),
                 Complex(1073741827, 1073741827) + Complex(1073741827, 0))
    assert_equal(Complex(0, 1073741827),
                 Complex(1073741827, 1073741827) - Complex(1073741827, 0))
    assert_equal(Complex(1152921511049297929, 1152921511049297929),
                 Complex(1073741827, 1073741827) * Complex(1073741827, 0))
    assert_equal(Complex(1, 1),
                 Complex(1073741827, 1073741827) / Complex(1073741827, 0))
    assert_equal(Complex(2147483616, 2147483616),
                 Complex(1073741827, 1073741827) + Complex(1073741789, 1073741789))
    assert_equal(Complex(38, 38),
                 Complex(1073741827, 1073741827) - Complex(1073741789, 1073741789))
    assert_equal(Complex(0, 2305842940494217006),
                 Complex(1073741827, 1073741827) * Complex(1073741789, 1073741789))
    assert_equal(Complex(Rational(1073741827, 1073741789), 0),
                 Complex(1073741827, 1073741827) / Complex(1073741789, 1073741789))
    assert_equal(Complex(2147483616, 2147483654),
                 Complex(1073741827, 1073741827) + Complex(1073741789, 1073741827))
    assert_equal(Complex(38, 0),
                 Complex(1073741827, 1073741827) - Complex(1073741789, 1073741827))
    assert_equal(Complex(-40802189426, 2305842981296406432),
                 Complex(1073741827, 1073741827) * Complex(1073741789, 1073741827))
    assert_equal(Complex(Rational(1152921490648203216, 1152921470247109225), Rational(-20401094713, 1152921470247109225)),
                 Complex(1073741827, 1073741827) / Complex(1073741789, 1073741827))
    assert_equal(Complex(2147483654, 2147483654),
                 Complex(1073741827, 1073741827) + Complex(1073741827, 1073741827))
    assert_equal(Complex(0, 0),
                 Complex(1073741827, 1073741827) - Complex(1073741827, 1073741827))
    assert_equal(Complex(0, 2305843022098595858),
                 Complex(1073741827, 1073741827) * Complex(1073741827, 1073741827))
    assert_equal(Complex(1, 0),
                 Complex(1073741827, 1073741827) / Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(1152921512123039718, 1073741827), Rational(1152921512123039718, 1073741827)),
                 Complex(1073741827, 1073741827) + Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921509975556140, 1073741827), Rational(1152921509975556140, 1073741827)),
                 Complex(1073741827, 1073741827) - Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(0, 2147483578),
                 Complex(1073741827, 1073741827) * Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921511049297929, 1073741789), 0),
                 Complex(1073741827, 1073741827) / Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(1152921471320850330, 1073741789), Rational(1152921471320850330, 1073741789)),
                 Complex(1073741827, 1073741827) + Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921469173366676, 1073741789), Rational(1152921469173366676, 1073741789)),
                 Complex(1073741827, 1073741827) - Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(0, Rational(2305843022098595858, 1073741789)),
                 Complex(1073741827, 1073741827) * Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(1073741789, 0),
                 Complex(1073741827, 1073741827) / Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921512123039718, 1073741827), Rational(1152921471320850330, 1073741789)),
                 Complex(1073741827, 1073741827) + Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921509975556140, 1073741827), Rational(1152921469173366676, 1073741789)),
                 Complex(1073741827, 1073741827) - Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(-81604377408, 1073741789), Rational(2305842940494218450, 1073741789)),
                 Complex(1073741827, 1073741827) * Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1427247611623053801969816945064593334552299725, 1329227916556757626754787505905300241), Rational(-50510661722949347514642033621130734624, 1329227916556757626754787505905300241)),
                 Complex(1073741827, 1073741827) / Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)), +Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(-1073741789, 1073741827), Rational(-1073741789, 1073741827)), -Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(2147483616, 1073741827), Rational(1073741789, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) + Complex(1, 0))
    assert_equal(Complex(Rational(-38, 1073741827), Rational(1073741789, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) - Complex(1, 0))
    assert_equal(Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) * Complex(1, 0))
    assert_equal(Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) / Complex(1, 0))
    assert_equal(Complex(Rational(1152921471320850292, 1073741827), Rational(1073741789, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) + Complex(1073741789, 0))
    assert_equal(Complex(Rational(-1152921469173366714, 1073741827), Rational(1073741789, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) - Complex(1073741789, 0))
    assert_equal(Complex(Rational(1152921429444920521, 1073741827), Rational(1152921429444920521, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) * Complex(1073741789, 0))
    assert_equal(Complex(Rational(1, 1073741827), Rational(1, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) / Complex(1073741789, 0))
    assert_equal(Complex(Rational(1152921512123039718, 1073741827), Rational(1073741789, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) + Complex(1073741827, 0))
    assert_equal(Complex(Rational(-1152921509975556140, 1073741827), Rational(1073741789, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) - Complex(1073741827, 0))
    assert_equal(Complex(1073741789, 1073741789),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) * Complex(1073741827, 0))
    assert_equal(Complex(Rational(1073741789, 1152921511049297929), Rational(1073741789, 1152921511049297929)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) / Complex(1073741827, 0))
    assert_equal(Complex(Rational(1152921471320850292, 1073741827), Rational(1152921471320850292, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) + Complex(1073741789, 1073741789))
    assert_equal(Complex(Rational(-1152921469173366714, 1073741827), Rational(-1152921469173366714, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) - Complex(1073741789, 1073741789))
    assert_equal(Complex(0, Rational(2305842858889841042, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) * Complex(1073741789, 1073741789))
    assert_equal(Complex(Rational(1, 1073741827), 0),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) / Complex(1073741789, 1073741789))
    assert_equal(Complex(Rational(1152921471320850292, 1073741827), Rational(1152921512123039718, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) + Complex(1073741789, 1073741827))
    assert_equal(Complex(Rational(-1152921469173366714, 1073741827), Rational(-1152921509975556140, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) - Complex(1073741789, 1073741827))
    assert_equal(Complex(Rational(-40802187982, 1073741827), Rational(2305842899692029024, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) * Complex(1073741789, 1073741827))
    assert_equal(Complex(Rational(1152921449846014512, 1237940005850657200720054075), Rational(-20401093991, 1237940005850657200720054075)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) / Complex(1073741789, 1073741827))
    assert_equal(Complex(Rational(1152921512123039718, 1073741827), Rational(1152921512123039718, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) + Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(-1152921509975556140, 1073741827), Rational(-1152921509975556140, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) - Complex(1073741827, 1073741827))
    assert_equal(Complex(0, 2147483578),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) * Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(1073741789, 1152921511049297929), 0),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) / Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(2147483578, 1073741827), Rational(2147483578, 1073741827)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) + Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(0, 0),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) - Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(0, Rational(2305842858889841042, 1152921511049297929)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) * Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(1, 0),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) / Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)))
    assert_equal(Complex(Rational(2305842940494218450, 1152921470247108503), Rational(2305842940494218450, 1152921470247108503)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) + Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(-81604377408, 1152921470247108503), Rational(-81604377408, 1152921470247108503)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) - Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(0, 2),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) * Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1152921429444920521, 1152921511049297929), 0),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) / Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(2147483578, 1073741827), Rational(2305842940494218450, 1152921470247108503)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) + Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(0, Rational(-81604377408, 1152921470247108503)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) - Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(-81604377408, 1152921511049297929), Rational(2305842940494218450, 1152921511049297929)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) * Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1329227869515036572020512360130906225, 1329227916556757626754787505905300241), Rational(-47041717725097069072123994784, 1329227916556757626754787505905300241)),
                 Complex(Rational(1073741789, 1073741827), Rational(1073741789, 1073741827)) / Complex(Rational(1073741789, 1073741827), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)), +Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(-1073741827, 1073741789), Rational(-1073741827, 1073741789)), -Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)))
    assert_equal(Complex(Rational(2147483616, 1073741789), Rational(1073741827, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) + Complex(1, 0))
    assert_equal(Complex(Rational(38, 1073741789), Rational(1073741827, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) - Complex(1, 0))
    assert_equal(Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) * Complex(1, 0))
    assert_equal(Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) / Complex(1, 0))
    assert_equal(Complex(Rational(1152921430518662348, 1073741789), Rational(1073741827, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) + Complex(1073741789, 0))
    assert_equal(Complex(Rational(-1152921428371178694, 1073741789), Rational(1073741827, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) - Complex(1073741789, 0))
    assert_equal(Complex(1073741827, 1073741827),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) * Complex(1073741789, 0))
    assert_equal(Complex(Rational(1073741827, 1152921429444920521), Rational(1073741827, 1152921429444920521)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) / Complex(1073741789, 0))
    assert_equal(Complex(Rational(1152921471320850330, 1073741789), Rational(1073741827, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) + Complex(1073741827, 0))
    assert_equal(Complex(Rational(-1152921469173366676, 1073741789), Rational(1073741827, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) - Complex(1073741827, 0))
    assert_equal(Complex(Rational(1152921511049297929, 1073741789), Rational(1152921511049297929, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) * Complex(1073741827, 0))
    assert_equal(Complex(Rational(1, 1073741789), Rational(1, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) / Complex(1073741827, 0))
    assert_equal(Complex(Rational(1152921430518662348, 1073741789), Rational(1152921430518662348, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) + Complex(1073741789, 1073741789))
    assert_equal(Complex(Rational(-1152921428371178694, 1073741789), Rational(-1152921428371178694, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) - Complex(1073741789, 1073741789))
    assert_equal(Complex(0, 2147483654),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) * Complex(1073741789, 1073741789))
    assert_equal(Complex(Rational(1073741827, 1152921429444920521), 0),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) / Complex(1073741789, 1073741789))
    assert_equal(Complex(Rational(1152921430518662348, 1073741789), Rational(1152921471320850330, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) + Complex(1073741789, 1073741827))
    assert_equal(Complex(Rational(-1152921428371178694, 1073741789), Rational(-1152921469173366676, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) - Complex(1073741789, 1073741827))
    assert_equal(Complex(Rational(-40802189426, 1073741789), Rational(2305842981296406432, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) * Complex(1073741789, 1073741827))
    assert_equal(Complex(Rational(1152921490648203216, 1237939962039641331329903525), Rational(-20401094713, 1237939962039641331329903525)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) / Complex(1073741789, 1073741827))
    assert_equal(Complex(Rational(1152921471320850330, 1073741789), Rational(1152921471320850330, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) + Complex(1073741827, 1073741827))
    assert_equal(Complex(Rational(-1152921469173366676, 1073741789), Rational(-1152921469173366676, 1073741789)),
                 Complex(Rational(1073741827, 1073741789), Rational(1073741827, 1073741789)) - Complex(1073741827, 1073741827))
    assert_equal(Complex(0, Rational(2305843022098595858, 1073741789)),