title: Increasing floating point precision in Python
body: <p>I was working on a project to compute the Leibniz approximation for pi with the below code:</p>
  
  <pre><code>def pi(precision):
      sign = True
      ret = 0
      for i in range(1,precision+1):
          odd = 2 * i - 1
          if sign:
              ret += 1.0 / odd
          else:
              ret -= 1.0 / odd
          sign = not sign
      return ret
  </code></pre>
  
  <p>However, the output value was always was 12 digits long. How can I increase the precision (e.g. more digits) of the calculation? Does Python support more precise floating points, or will I have to use some external library?</p>