[GAP Forum] Square root of cyclotomic real number

Dmitrii Pasechnik dmitrii.pasechnik at cs.ox.ac.uk
Tue May 17 12:41:13 BST 2016


Dear Marek,

Just in case, Sage(math) has no problem with computing these square roots.

sage: n=libgap.eval('E(20)-E(20)^9').sage()
sage: s=n.sqrt(); s # ugly, unsimplified
sqrt(-(1/4*I*sqrt(5) + 1/4*sqrt(2*sqrt(5) + 10) - 1/4*I)^7 +
(1/4*I*sqrt(5) + 1/4*sqrt(2*sqrt(5) + 10) - 1/4*I)^5 - (1/4*I*sqrt(5) +
1/4*sqrt(2*sqrt(5) + 10) - 1/4*I)^3 + 1/2*I*sqrt(5) + 1/2*sqrt(2*sqrt(5)
+ 10) - 1/2*I)
sage: n.n() # looking at numerical approximations
1.90211303259031 + 1.11022302462516e-16*I
sage: (s^2).n() # looking at numerical approximations
1.90211303259031 - 2.22044604925031e-16*I

One way or another, you need functionality to construct and to compute
in quadratic extensions of cyclotomic fields, and this might be slow,
unless someone programs a way to do the square root in the cyclotomic
field (my number theory is not good, but IIRC you would always be able
to work in cyclotomics, perhaps of bigger degree).


HTH,
Dima

On Mon, May 16, 2016 at 09:34:14PM +0200, Marek Mitros wrote:
> Thank you for the answer. It is a pity, that I cannot obtain unitary matrix
> from the set of orthogonal columns.
> I must think of another method.
> 
> Regards,
> Marek
> 13-05-2016 18:08 użytkownik "Alexander Hulpke" <hulpke at fastmail.fm> napisał:
> 
> > Dear Forum, Dear Marek Mitros,
> >
> > Sqrt (as a short hand for the ER cyclotomic) will only work for rational
> > numbers. If you wanted a square root of a cyclotomic number you would need
> > to factor x^2-a over a suitable cyclotomic field.
> >
> > Best,
> >
> >    Alexander Hulpke
> >
> > > On May 13, 2016, at 8:30 AM, Marek Mitros <marek at mitros.org> wrote:
> > >
> > > Dear All,
> > >
> > > I am doing following calculation and I need square root of cyclotomic
> > > number being real number. Here is example below. Is there any workaround
> > > for this ?
> > > What I am doing I obtained vector v of complex number which not unit
> > > length. In order to normalize it I perform following and I receive the
> > > error. Do I need more knowledge about cyclotomic numbers ?
> > >
> > > gap> v1:=v/Sqrt(v*ComplexConjugate(v));
> > >
> > > Error, no method found! For debugging hints type ?Recovery from
> > > NoMethodFound
> > >
> > > Error, no 1st choice method found for `Sqrt' on 1 arguments called from
> > >
> > > <function "HANDLE_METHOD_NOT_FOUND">( <arguments> )
> > >
> > > (...)
> > >
> > > gap> n:=E(20)-E(20)^9;
> > >
> > > E(20)-E(20)^9
> > >
> > > gap> RealPart(n);
> > >
> > > E(20)-E(20)^9
> > >
> > > gap> Sqrt(n);
> > >
> > > Error, no method found! For debugging hints type ?Recovery from
> > > NoMethodFound
> > >
> > > Error, no 1st choice method found for `Sqrt' on 1 arguments called from
> > >
> > >
> > > Regards,
> > >
> > > Marek
> > > _______________________________________________
> > > Forum mailing list
> > > Forum at mail.gap-system.org
> > > http://mail.gap-system.org/mailman/listinfo/forum
> >
> >
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum



More information about the Forum mailing list