Calculate PI to n digits [duplicate]

There have been many questions asking for variations on how to write Pi but none are like this...

EDIT: There are many questions asking for the nth digit of Pi, I am asking for UPTO the nth digit.

The Objective: Quite simple on writing, create a programme that takes a input, I will call it n and outputs Pi to the nth digits.

Rules: Normal code golf rules apply, your code may not have Pi anywhere in it. This is so the shortest answer in bytes

Hints: It is not necessary to use this, but it may help: https://www.math.hmc.edu/funfacts/ffiles/30001.1-3.shtml where Pi/4 = 1 - 1/3 + 1/5 - 1/7 + ...

This is my first post on codegolf, so any comments on things to improve will be well appreciated.

Good luck!

• Pretty sure it's a duplicate Jan 12 '17 at 20:48
• Of which one? I will take down if so.
– Octo
Jan 12 '17 at 20:48
• codegolf.stackexchange.com/questions/84444/… Jan 12 '17 at 20:48
• It's not different enough IMO. To calculate the nth digit of pi, you pretty much have to calculate the digits before it. Jan 12 '17 at 20:50
• @EasterlyIrk Just as a note, these kinds of formulas do exist in general: they are called Spigot Algorithms. One does exist for pi, but it is in binary, and as far as I know you can't avoid also calculating the predigits to get the base ten values. However, requiring that the algorithm support very large n could still be sufficient to make this not a duplicate. Jan 13 '17 at 2:04