Complex numbers product using only three multiplications

后端 未结 5 602
一生所求
一生所求 2020-12-28 19:47

We do complex number multiplication as follows:

(a + i * b) * (c + i * d) = (a * c - b * d) + i * (a * d + b * c)

The real and imaginary pa

5条回答
  •  独厮守ぢ
    2020-12-28 20:22

    For completeness, I'd like to point out Gauss' complex multiplication algorithm, which is another way to do complex multiplication with only three multiplies. To summarize, you compute

    k1 = c * (a + b)
    k2 = a * (d - c)
    k3 = b * (c + d)
    Real part = k1 - k3
    Imaginary part = k1 + k2
    

提交回复
热议问题