I have to calculate the angle of complex summations like
(exp(1i*0)+exp(1i*2*pi/3)+exp(1i*-2*pi/3))
which is equal to
(exp(1i*0)+exp(1i*2*pi/3)+exp(1i*4*pi/3))
but the results are different! because of the precision of exp matlab function.
ans =
4.4409e-16
ans =
-2.2204e-16 + 2.2204e-16i
the angle of the first one is zero but the second one result $3\pi/4$ which is wrong!