title: Calculating larger values of the ackermann function
body: <p>I have some code:</p>
  
  <pre><code>int CalculateAckermann(int x, int y)
  {
      if(!x)
      {
          return y++;
      }
      if(!y)
      {
          return CalculateAckermann(x--,1);
      }
      else
      {
          return CalculateAckermann(x--, CalculateAckermann(x, y--));
      }
  }
  </code></pre>
  
  <p>Designed to calculate the ackermann function. Above a fairly low number of x and y the application causes a stack overflow because it recurses too deeply and results in pretty big numbers. How would I go about slowly calculating a solution?</p>