Sounds right, can you open a ticket?
On Tuesday, September 1, 2015 at 1:41:06 PM UTC-4, Antonio Francisco Behn Von Schmieden wrote: > > There seems to be a bug in the implementation of the coercion from > universal cyclotomic field. The rational part disappears when converting. > For example: > > F.<c>=CyclotomicField(4) > F(-1/2 + 1/2*E(4)) > > 1/2*c^2 > > > Reading the code: > from sage.rings.number_field.number_field import > CyclotomicField > k = self._obj.Conductor().sage() > Rcan = CyclotomicField(k) > if R is None: > R = Rcan > obj = self._obj > if obj.IsRat(): > return R(obj.sage()) > zeta = Rcan.gen() > coeffs = obj.CoeffsCyc(k).sage() > return R(sum(coeffs[a] * zeta**a for a in range(1,k))) > > I believe the problem is in the range(1,k) which should be range(0,k) > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
