$RecursionLimit
Usage
Notes
Further Examples
This gives the current value of $RecursionLimit.
In[1]:=
|
Out[1]=
|
SumOfIntegers adds up the integers from to n.
In[2]:=
|
$RecursionLimit stops infinite recursion.
In[3]:=
|
Out[3]=
|
Add a termination rule.
In[4]:=
|
Out[4]=
|
Now the calculation will finish.
In[5]:=
|
Out[5]=
|
The calculation may still fail if the number of required recursive evaluations exceeds the value of $RecursionLimit.
In[6]:=
|
Out[6]=
|
You can use Block to temporarily change the value of $RecursionLimit.
In[7]:=
|
Out[7]=
|
|