<P> If S <0, then its principal square root is </P> <Dl> <Dd> S = S i . (\ displaystyle (\ sqrt (S)) = (\ sqrt (\ vert S \ vert)) \, \, i \, .) </Dd> </Dl> <Dd> S = S i . (\ displaystyle (\ sqrt (S)) = (\ sqrt (\ vert S \ vert)) \, \, i \, .) </Dd> <P> If S = a+bi where a and b are real and b ≠ 0, then its principal square root is </P>

Algo to find square root of a number