bb schrieb:
sage: 2^3^4^5
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call
last)
/home/bb/sage-4.3.5/<ipython console> in <module>()
/home/bb/sage-4.3.5/local/lib/python2.6/site-packages/sage/rings/integer.so
in sage.rings.integer.Integer.__pow__ (sage/rings/integer.c:12114)()
RuntimeError: exponent must be at most 9223372036854775807
sage: float(2^3^4^5)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call
last)
/home/bb/sage-4.3.5/<ipython console> in <module>()
/home/bb/sage-4.3.5/local/lib/python2.6/site-packages/sage/rings/integer.so
in sage.rings.integer.Integer.__pow__ (sage/rings/integer.c:12114)()
RuntimeError: exponent must be at most 9223372036854775807
sage: long(2^3^4^5)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call
last)
/home/bb/sage-4.3.5/<ipython console> in <module>()
/home/bb/sage-4.3.5/local/lib/python2.6/site-packages/sage/rings/integer.so
in sage.rings.integer.Integer.__pow__ (sage/rings/integer.c:12114)()
RuntimeError: exponent must be at most 9223372036854775807
sage:
I get a runtime error, but just would expect infinity! Is there
something wrong or any explanation?
This works:
sage: 2^3^4^2
and results in a huge number!
Tnx & Regards BB
With another input Sage can do the job.
sage: ((2^3)^4)^5
1152921504606846976
sage:
The same with maxima! maxima crashes without parenteses.
I did some experiments with different systems with the statement with
FreeMat:
--> 2^3^4^5
ans =
0
-->
I wonder about the last result? I would expect infinity or such a thing.
It works this way:
--> ((2^3)^4)^5
ans =
1152921504606846976
-->
Something strange happens with this:
--> 2^3^4
ans =
2,4179e+24
--> 2^3^4^3
ans =
0
--> 2^3^4^2
ans =
inf
-->
One might calculate with another calculator, that 2^3^4 should give 4096.
In Octave I get the following:
octave3.2:15> 2^3^4^5
ans = 1.1529e+18
octave3.2:16>
Maxima crashes and ends the program unexpected with an error message.
Maxima as well can handle it in this expression:
(%i1) ((2^3)^4)^5
;
(%o1) 1152921504606846976
(%i2)
Regards BB
The exponent will be set high by the Mail-Program!
--
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