Complex numbers product using only three multiplications

后端 未结 5 576
一生所求
一生所求 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:20

    You are interested in two numbers : A=ac−bd and B=ad+bc. Compute three real multiplications S1=ac, S2=bd, and S3=(a+b)(c+d). Now you can compute the results as A=S1−S2 and B=S3−S1−S2.

    This process is called Karatsuba multiplication and used heavily in Algorithm analysis.

    It is used to find the closest pair of points.

提交回复
热议问题