On 5 Sep., 18:33, William Stein <wst...@gmail.com> wrote:
> That said, for consistency with the rest of Sage, e.g., that int(1) +
> Integer(2) is an Integer, we should have int(3)^Integer(2) be an
> Integer.

These are completely different things; see my previous post.


Btw., functions like e.g. gcd() do not preserve the type either, i.e.
type(gcd(int(x),int(y)) is Integer, which is IMHO yet a different
case, but still a bit odd, since the result can certainly be of the
same type as the inputs (assuming they agree), and therefore should
be.

gcd(QQ(x),y) yields a Rational even if x is integer, while xgcd()
returns (Integer,Integer,Integer) for the same inputs.


-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