On 11/01/13 00:44, Andrey Zhezherun wrote:
This patch implements complex division correctly. The existing implementation did something else which is not division.
How about making it more numerically safe? Something like this should do the job: if(|c|>=|d|) (a+ib)/(c+id) = ((a+b(d/c))+i(b-a(d/c)))/(c+d(d/c)) else (a+ib)/(c+id) = ((a(c/d)+b)+i(b(c/d)-a))/(c(c/d)+d)
Thanks, Piotr