def sqrt_complex2(c): a=c.real b=c.imag module=abs(c) x=sqrt((a+module)/2) y=sqrt((module-a)/2) if b<0: y=-y return complex(-x,-y),complex(x,y)