Project: Complex Number Class
[[Complex_number|Complex numbers]] is a number that can be expressed in the form `a + bi` where `a` and `b` are real numbers and `i` represents the imaginary quantity `sqrt(-1)`. Define a complex number class that can perform multiplication, division, reciprocal, addition, subtraction, absolute value (magnitude), argument (phase), square root, exponential, and natural logarithm functions.
Output
$ node ComplexNumberClass.js
a: 1+1i
b: 3+4i
a + b: 4+5i
a - b: -2-3i
a * b: -1+7i
1 / a: 0.5-0.5i
1 / b: 0.12-0.16i
a / b: 0.28-0.04000000000000001i
|a|: 1.4142135623730951
|b|: 5
φ(a): 0.7853981633974484
φ(b): 0.9272952180016122
sqrt(a): 1.09868411346781+0.4550898605622274i
sqrt(b): 2+1i
exp(a): 1.4686939399158851+2.2873552871788423i
exp(b): -13.128783081462158-15.200784463067954i
ln(a): 0.3465735902799727+0.7853981633974484i
ln(b): 1.6094379124341003+0.9272952180016122i