Dear Forum Users, I need to calculate Sqrt(1+2i) i.e. find the complex number z=a+bi such that z^2=(1+2i). Using traditional pen and paper I calculated that a=Sqrt((1+Sqrt(5))/2) and b=Sqrt((Sqrt(5)-1)/2). But how to express these numbers in GAP ? Is this number cyclotomic or not ? Using formula for tangent (x/2) = (1-cos(x))/sin(x) I obtain number c=1+ ((Sqrt(5)-1)/2)*i which is collinear with needed number i.e. have the same angle. So we have ImaginaryPart(c*(1-2*i))=0.
Another question I have is how to normalize complex number in GAP. E.g. I have number c=1+ ((Sqrt(5)-1)/2)*i and I would like to find number c/|c| i.e. lying on unit circle on complex plane. If the |c|^2 is rational then I can apply Sqrt. But this does not work for real cyclotomics. Any advice ? Regards, Marek _______________________________________________ Forum mailing list Forum@mail.gap-system.org http://mail.gap-system.org/mailman/listinfo/forum