A Running Example – Complex Number System* * Taken from the book Structure and Interpretation of Computer Programs Elementary Operators Addition: z 1 + z 2 Real-part(z 1 + z 2 ) = Real-part(z 1 ) + Real-part(z 2 ) Imaginary-part(z 1 + z 2 ) = Imaginary-part(z 1 ) + Imaginary-part(z 2 ) Subtraction Replace - for + in addition Multiplication Magnitude(z 1 * z 2 ) = Magnitude(z 1 ) * Magnitude (z 2 ) Angle(z 1 * z 2 ) = Angle(z 1 ) + Angle(z 2 ) Division Replace / for * and - for + in multiplication 4
{}