On Mar 29, 2009, at 5:00 AM, Burcin Erocal wrote:

> Hi,
>
> Recently it was pointed out on sage-support that pynac symbolics don't
> work well with the __pow__ operator. E.g.,
>
> sage: var('n',ns=1)
> n
> sage: (QQbar(2))^n
> <boom>
>
> or:
>
> sage: Mod(2,7)^n
> <boom>
>
> Since pynac supports using arbitrary Sage objects as numeric  
> objects in
> symbolic expressions, we should return a symbolic expression as a
> result of the above commands.
>
> There is special code to handle this for some elements (RDF, QQ,
> etc.) that could be coerced to maxima symbolics already in the  
> library.
> It would be better to add some generic code to handle this for all
> elements.

+1

> Issue #269 on trac proposes that __pow__ is added to the coercion
> model, along with floordiv, mod, gcd, xgcd. Is there any previous work
> on this? Or, is it better to start from scratch to fix the __pow__
> problem?

I don't think there's been much (if anything) along these lines. One  
difference with __pow__ is that the two operands should not, in  
general, be coerced to the same parent (e.g. many things take integer  
powers, but few things can be raised even to themselves (e.g. x^x)  
without coercing to symbolics).

- Robert



--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to