title: how to use more precision in c++
body: <p>Hi i have built an algorithm to calculate pi but i use long float for it so i just get 3.14159 as a result, i need more precision. How?
  here is the code:</p>
  
  <pre><code>    #include &lt;iostream&gt;
  #include &lt;math.h&gt;
  using namespace std;
  
  int main ()
  {
    long double a, l, p, pi, r;
    long long int n, m;
    r = 100000;
    a = r * sqrt (3) / 2 ;
    n = 100000;
    m = 6;
    while (n &gt; m)
    {
      a = sqrt (r / 2 * (r + a));
    m = m * 2 ;
    }
    l = sqrt (4 * (pow (r, 2) - pow (a, 2)));
    p = m * l;
    pi = p / (2 * r) ;
    cout &lt;&lt; pi &lt;&lt; endl;
    cout &lt;&lt; "number of corners used: " &lt;&lt; m &lt;&lt; endl;
    return 0;
  }
  </code></pre>
  
  <p>By the way there is a 24 core (12 dual core nodes) supercomputer at my high school, just in case</p>