On 22 October 2016 at 17:28, Vincent Delecroix
<20100.delecr...@gmail.com> wrote:
> On 22 October 2016 at 16:10, Ralf Stephan <gtrw...@gmail.com> wrote:
>> On Saturday, October 22, 2016 at 4:04:55 PM UTC+2, John Cremona wrote:
>>>
>>> So Ralf,  do you want to catch the case where the exponent in QQbar is
>>> actually rational and then do what QQbar already knows how to do
>>> (raise to a rational power), returning an element of QQbar;  and raise
>>> an Error of some kind in the other case?
>>
>>
>> Exactly, if noone is objecting.
>
> I am strongly objecting. The behavior of any operation in Sage is that
> the parent of op(a, b) should only depend on the operator op,
> parent(a) and parent(b). Powers are a bit special but not enough to
> use conversion instead of coercion.

Counterexamples:

sage: parent(RR(1).sqrt())
Real Field with 53 bits of precision
sage: parent(RR(-1).sqrt())
Complex Field with 53 bits of precision

and:

sage: parent(QQ(1).sqrt())
Rational Field
sage: parent(QQ(2).sqrt())
Symbolic Ring


>
> What can be done is that pow(a, b) with paren(a) = ZZ and parent(b) =
> QQbar can go to SR where everything might be defined.
>
> --
> 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 sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> 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 sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to