title: Function to find the nth digit of Pi
body: <p>I have always wanted to find an algorithm that did this. I do not care how slow it is, just as long as it can return the nth digit of Pi:</p>
  
  <p>ex:</p>
  
  <pre><code>size_t piAt(long long int n)
  {
  }
  </code></pre>
  
  <p>Preferably, not using an infinite series.</p>
  
  <p>If anyone has a function or class that does this, in C or C++ I'd really be interested in seeing it. </p>
  
  <p>Thanks</p>