Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Expressions > Evaluation Control >

$IterationLimit

$IterationLimit
gives the maximum length of evaluation chain used in trying to evaluate any expression.
  • $IterationLimit limits the number of times Mathematica tries to re-evaluate a particular expression.
The default $IterationLimit:
Define a function in an iterative fashion:
Evaluate by temporarily setting $IterationLimit to a different value:
With a higher $IterationLimit we can compute the function:
The default $IterationLimit:
In[1]:=
Click for copyable input
Out[1]=
 
Define a function in an iterative fashion:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Evaluate by temporarily setting $IterationLimit to a different value:
In[3]:=
Click for copyable input
Out[3]=
With a higher $IterationLimit we can compute the function:
In[4]:=
Click for copyable input
Out[4]=
Use ReleaseHold to keep going with the iteration:
The iteration limit can be set to infty to allow any number of evaluation steps:
The iteration limit protects against runaway definitions:
The recursion limit protects against recursive runaway definitions:
New in 2
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team