Implementing complex numbers.
Mathematical preliminaries
A complex number is a number that can be expressed in the form a +bi , where a and b are real
numbers and i is the imaginary unit, which satises the equation i 2= −1 . 1 For a + bi we call
a the real part and b the imaginary part.
We defne addition, subtraction, multiplication, and division asfollows:
Addition:
(a + bi) + (c + di) = (a + c) + (b + d)i
Subtraction:
(a + bi) − (c + di) = (a − c) + (b − d)i
Multiplication:
(a + bi)(c + di) = (ac − bd) + (bc +
PayPal Gateway not configured
PayPal Gateway not configured