https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122059

--- Comment #2 from Fred J. Tydeman <tydeman at tybor dot com> ---
Complex divide:

(x+I*y)
-------
(w+I*z)

(x+I*y)   (w-I*z)
------- * ------- 
(w+I*z)   (w-I*z)

(x+I*y)   (w-I*z)
------- * ------- 
(w+I*z)   (w-I*z)

w*x+y*z + I*(w*y-x*z)
---------------------
    w*w + z*z

Assume w and z are finite, but approaching infinity.
Then that becomes

 1+1 + I*(1-1)
---------------------
    w + z

which becomes

  0 + I*0

In polar terms:
(finite,theta1) / (infinity,theta2)
== (finite/infinity,theta1-theta2)
== (0,theta1-theta2)
which converted to rectangular is
0 + I*0

More details can be found in:
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1399.htm

Reply via email to