MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: big integer for Range

  • To: mathgroup at
  • Subject: [mg61394] Re: Re: big integer for Range
  • From: "Scout" <mathem at>
  • Date: Tue, 18 Oct 2005 02:44:35 -0400 (EDT)
  • References: <diktip$515$> <> <dislhd$mgf$>
  • Sender: owner-wri-mathgroup at

"Murray Eisenberg" <murray at> ha scritto nel messaggio 
news:dislhd$mgf$1 at
> Aside from the particular design of Mathematica, there's no particular
> reason that available (physical RAM + VM) need limit the length of a  list

What that follows is reported in the Math 5.2 Documentation:
1.4.9 The Limits of Mathematica

In just one Mathematica command, you can easily specify a calculation that 
is far too complicated for any computer to do. For example, you could ask 
for Expand[(1+x)^(10^100)]. The result of this calculation would have 
terms--more than the total number of particles in the universe.

[...]. Exactly at what point this happens depends not only on the total 
amount of memory your computer has, but often also on such details as what 
other jobs happen to be running on your computer when you try to do your 

If your computer does run out of memory in the middle of a calculation, most 
versions of Mathematica have no choice but to stop immediately. As a result, 
it is important to plan your calculations so that they never need more 
memory than your computer has.

[...] This means that even if the final result is small, the intermediate 
parts of a calculation can be too big for your computer to handle. If this 
happens, you can usually break your calculation into pieces, and succeed in 
doing each piece on its own. You should know that the internal scheme which 
Mathematica uses for memory management is such that once part of a 
calculation is finished, the memory used to store intermediate expressions 
that arose is immediately made available for new expressions.

Memory space is the most common limiting factor in Mathematica calculations. 
Time can also, however, be a limiting factor. [...]


Whether or not the only algorithms involve exponentially increasing amounts 
of time, there will always come a point where a computation is too large or 
time-consuming to do on your particular computer system. As you work with 
Mathematica, you should develop some feeling for the limits on the kinds of 
calculations you can do in your particular application area.

> a program could write out parts of a list that's too long to a
> file, then retrieve parts of it as needed -- all transparent to the
> user.  Evidently Mathematica does not do this.

Yes, you could program by yourself the code so that you can save in a file 
on hard-disk the progress of the job and calling  in memory the necessary 
part for the next calculus.



  • Prev by Date: Re: Solving Diophantine Equations
  • Next by Date: Re: How smooth graphs?
  • Previous by thread: Re: Re: big integer for Range
  • Next by thread: Shadowing of symbols in a package