Changes between Version 6 and Version 7 of Ticket #5574


Ignore:
Timestamp:
01/08/18 09:03:36 (3 years ago)
Author:
jdemeyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5574

    • Property Dependencies changed from to #24247
  • Ticket #5574 – Description

    v6 v7  
    22
    33{{{
    4 sage: var('n',ns=1)
    5 n
    6 sage: (QQbar(2)^3)^n
     4sage: n = SR.var('n'); QQbar(2)^n
    75---------------------------------------------------------------------------
    86TypeError                                 Traceback (most recent call last)
     7<ipython-input-6-01e1c4db05c9> in <module>()
     8----> 1 n = SR.var('n'); QQbar(Integer(2))**n
    99
    10 <...>
    11 <...>/sage/rings/qqbar.pyc in __pow__(self, e)
    12    2808             1
    13    2809         """
    14 -> 2810         e = QQ._coerce_(e)
    15    2811         n = e.numerator()
    16    2812         d = e.denominator()
     10/usr/local/src/sage-config/local/lib/python2.7/site-packages/sage/rings/qqbar.pyc in __pow__(self, e)
     11   4106         if self == self.parent().one():
     12   4107             return self.parent().one()
     13-> 4108         e = QQ._coerce_(e)
     14   4109         n = e.numerator()
     15   4110         d = e.denominator()
    1716
    18 <...>/sage/structure/parent_old.so in
    19 sage.structure.parent_old.Parent._coerce_ (sage/structure
    20 /parent_old.c:4031)()
     17/usr/local/src/sage-config/src/sage/structure/parent_old.pyx in sage.structure.parent_old.Parent._coerce_ (build/cythonized/sage/structure/parent_old.c:5673)()
     18    227     def _coerce_(self, x):            # Call this from Python (do not override!)
     19    228         if self._element_constructor is not None:
     20--> 229             return self.coerce(x)
     21    230         check_old_coerce(self)
     22    231         return self._coerce_c(x)
    2123
    22 <...>/site-packages/sage/structure/parent.so in
    23 sage.structure.parent.Parent.coerce (sage/structure/parent.c:4185)()
     24/usr/local/src/sage-config/src/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:10829)()
     25   1157                 except Exception:
     26   1158                     _record_exception()
     27-> 1159             raise TypeError("no canonical coercion from %s to %s" % (parent(x), self))
     28   1160         else:
     29   1161             return (<map.Map>mor)._call_(x)
    2430
    25 TypeError: no canonical coercion from New Symbolic Ring to Rational
    26 Field
     31TypeError: no canonical coercion from Symbolic Ring to Rational Field
     32}}}
    2733
    28 also:
     34Also:
    2935
    30 sage: (QQbar(2)^3)^1.
    31 ...
     36{{{
     37sage: QQbar(2)^1.0
     38---------------------------------------------------------------------------
     39TypeError                                 Traceback (most recent call last)
     40<ipython-input-7-aba7adf5dc93> in <module>()
     41----> 1 QQbar(Integer(2))**RealNumber('1.0')
     42
     43/usr/local/src/sage-config/local/lib/python2.7/site-packages/sage/rings/qqbar.pyc in __pow__(self, e)
     44   4106         if self == self.parent().one():
     45   4107             return self.parent().one()
     46-> 4108         e = QQ._coerce_(e)
     47   4109         n = e.numerator()
     48   4110         d = e.denominator()
     49
     50/usr/local/src/sage-config/src/sage/structure/parent_old.pyx in sage.structure.parent_old.Parent._coerce_ (build/cythonized/sage/structure/parent_old.c:5673)()
     51    227     def _coerce_(self, x):            # Call this from Python (do not override!)
     52    228         if self._element_constructor is not None:
     53--> 229             return self.coerce(x)
     54    230         check_old_coerce(self)
     55    231         return self._coerce_c(x)
     56
     57/usr/local/src/sage-config/src/sage/structure/parent.pyx in sage.structure.parent.Parent.coerce (build/cythonized/sage/structure/parent.c:10829)()
     58   1157                 except Exception:
     59   1158                     _record_exception()
     60-> 1159             raise TypeError("no canonical coercion from %s to %s" % (parent(x), self))
     61   1160         else:
     62   1161             return (<map.Map>mor)._call_(x)
     63
    3264TypeError: no canonical coercion from Real Field with 53 bits of precision to Rational Field
    3365}}}