[Maxima] Integer overflows
macrakis at alum.mit.edu
Wed Jun 6 12:45:40 CDT 2012
Welcome to Maxima!
Maxima can represent exact, explicit integers essentially to the limit of
memory capacity. It is generally a bad
manipulate numbers that are larger than RAM, even if your computer can
An n-bit integer is represented internally with either n/8 and n/4 bytes
(depending on the implementation). Thus, the number 2^3^4^5 would take
over 10^487 bytes of memory. You can calculate this in Maxima directly
using bigfloat arithmetic:
Given that all the computer memory on earth comes to about 10^21
that there are only about 10^80 atoms in the
it seems unlikely that that number could be expressed *in extenso.
What exactly are you trying to accomplish?
For example, using bfloat arithmetic, you can easily get (say) the first
1000 decimal digits of 2^3^4^5:
Using modular arithmetic, you can easily get (say) the last 1000 decimal
(This comes out negative; you can use modulus(..., 10^1000) to get the
Does any of this help?
On Wed, Jun 6, 2012 at 12:50 PM, Jorge Calvo <Jorge.Calvo at avemaria.edu>wrote:
> I just started learning Maxima and am enjoying it quite a bit. In a
> previous post to this list, it was mentioned that entering
> > 2^3^4^5;
> gives what appears to be an overflow error. My question is what is the
> largest integer that Maxima can handle. Information on the actual
> representation of integers would also be appreciated.
> Dr. Jorge Alberto Calvo
> Associate Professor of Mathematics
> Department of Mathematics and Physics
> Ave Maria University
> Phone: (239) 280-1608
> Email: jorge.calvo at avemaria.edu
> Web: http://sites.google.com/site/jorgealbertocalvo
> Maxima mailing list
> Maxima at math.utexas.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Maxima