On 5 Sep., 17:44, Dima Pasechnik <dimp...@gmail.com> wrote:
> Presently, int()^whatever stays Pythonic, no matter it causes a loss of
> precision, or not.

Not true:

sage: 3r^ZZ(-3)
0.037037037037037035
sage: 3r^QQ(-3)
1/27


I'm strongly against making the result of exponentiation (of e.g.
Python ints) depend on the exponent's *type*; it should only depend on
its *value*, in this case yielding either Python ints or floats in
turn.

Exponentiation isn't commutative (nor associative), in contrast to
multiplication and addition, where a factor / summand of type Integer
makes the product / sum be of Sage's Integer type.


-leif

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

Reply via email to