Complex Number Package

ComplexNumberPackage must support the following operators:

Let z1 = x1 + y1j and z2 = x2 + y2j.

It must also handle coefficients (real and imaginary) with an arbitrary mix of the following primitive types:

Each of the arithmetic operations must operate correctly when applied to any non-complex argument -- ie: (1.2 + 3.4j) + 5 = (6.2 + 3.4j).

Each of the arithmetic operations must, of course, be commutative, including with mixed arguments -- ie: (A + Bj) * C == C * (A + Bj) and so on.

If any of us get truly motivated, we should probably write ComplexNumberPackageUnitTest that must be passed by a putative candidate. We then contrast and compare the performance of packages that pass the unit test.


See also ComplexNumbers, ComplexNumberTest


CategoryMath


EditText of this page (last edited February 27, 2010) or FindPage with title or text search