In 3.4.2 I get this:

sage: x = polygen(QQbar)
sage: f = 3*x^4 - 4*x^3 - 1046148*x^2 - 335575956*x - 30288853512
sage: rts = f.roots(multiplicities=False)
sage: [r.sqrt() for r in rts]
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

/home/jec/sage-4.3.2/devel/sage-tests/<ipython console> in <module>()

/home/jec/sage-current/local/lib/python2.6/site-packages/sage/rings/qqbar.pyc
in sqrt(self)
   2449             0.7071067811865475? + 0.7071067811865475?*I
   2450         """
-> 2451         return self.__pow__(~ZZ(2))
   2452
   2453     def nth_root(self, n):

/home/jec/sage-current/local/lib/python2.6/site-packages/sage/rings/qqbar.pyc
in __pow__(self, e)
   2953                 isgn = self.imag().sign()
   2954                 val = self._value
-> 2955                 argument = val.argument()
   2956                 if isgn == 0:
   2957                     argument = argument.parent().pi()

/home/jec/sage-current/local/lib/python2.6/site-packages/sage/structure/element.so
in sage.structure.element.Element.__getattr__
(sage/structure/element.c:2725)()

/home/jec/sage-current/local/lib/python2.6/site-packages/sage/structure/parent.so
in sage.structure.parent.getattr_from_other_class
(sage/structure/parent.c:2832)()

/home/jec/sage-current/local/lib/python2.6/site-packages/sage/structure/parent.so
in sage.structure.parent.raise_attribute_error
(sage/structure/parent.c:2599)()

AttributeError: 'sage.rings.real_mpfi.RealIntervalFieldElement' object
has no attribute 'argument'
sage: [r.sqrt() for r in rts]
[26.89930078070870?, 15.64182427553343?*I, 0.10896562034989? -
15.45309240093827?*I, 0.10896562034989? + 15.45309240093827?*I]


So the first time I evaluate the line [r.sqrt() for r in rts] I get an
error but the second time it works.  Any ideas?

John

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to