I see, you're thinking algebraically not computationally. The latter view would try to convert to QQ, and only then try to coerce, in order to catch the rational case first and not give an error where none is expected.
On Saturday, October 22, 2016 at 3:11:50 PM UTC+2, John Cremona wrote: > > On 22 October 2016 at 09:37, Ralf Stephan <[email protected] <javascript:>> > wrote: > > sage: 2*(QQbar(1)) > > 2 > > sage: 2^(QQbar(1)) > > ... > > TypeError: no canonical coercion from Algebraic Field to Rational Field > > > > Why does the one work, the other not? Is it a bug? > > I don't see that as a bug. Any product of an integer and an element > of QQbar is defined, and is again an element of QQbar, but not any > integer raised to a QQbar exponent. I think it is a rather hard > question to determine for which algebraic numbers a is 2^a algebraic! > > John Cremona > > > > > Regards, > > > > -- > > 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] <javascript:>. > > To post to this group, send email to [email protected] > <javascript:>. > > Visit this group at https://groups.google.com/group/sage-support. > > For more options, visit https://groups.google.com/d/optout. > -- 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 https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
