On Mon, Apr 19, 2010 at 11:52 AM, bb <[email protected]> wrote:
> I get a runtime error, but just would expect infinity! Is there something
> wrong or any explanation?

This is because when you do 2^3^4^5 you are computing that number
exactly as an integer, and that number is definitely not infinity.  If
you wanted to use floating point arithmetic, then you should start
with something like 2.0:

sage: 2.0^3^4^5
+infinity

Doing something like float(2^3^4^5) computes 2^3^4^5 as an integer and
then tries to convert that to a float.

Also, note that when you type in such an expression, the operations
are done in the following manner:

var(sage: var('x, y, z')
(x, y, z)
sage: x^y^z
x^(y^z)

which is different than

sage: (x^y)^z
(x^y)^z

Since exponentiation is non-associative, you need to be careful with
such differences.

--Mike

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to