In the book Pi: A Source Book I found the following:
Extract the square root of twelve times the diameter squared. This is the first term. Dividing the first term repeatedly by 3, obtain other terms: the second after one division by 3, the third after more division and so on. Divide the terms in order by the odd integers $1,\,3,\,5,\,\ldots$; add the odd-order terms to, and subtract the even order terms from, the preceding. The result is the circumference.
That is equivalent to $$\pi =\sqrt{12}\sum_{n\ge 0}\frac{(-1)^n}{3^n(2n+1)}.$$
The formula is due to an Indian mathematician Madhava of Sangamagrama.
The proof of this formula should be in the treatise Yuktibhāṣā written in c. 1530 by an Indian astronomer Jyesthadeva, which I don't have access to. I've been trying to find a proof of the formula elsewhere but with no success.
Maybe this could be proved from $$\arctan x=\sum_{n\ge 0}\frac{(-1)^n x^{2n+1}}{2n+1}$$ which is mentioned in Yuktibhāṣā as well, but I don't see how could that be done.
In fact $\frac{\pi}{6}=\arctan\frac{1}{\sqrt{3}}=\frac{1}{\sqrt{3}}\sum_{n\ge0}\frac{(-1)^n}{3^n(2n+1)}$, so $\sqrt{12}\sum_{n\ge0}\frac{(-1)^n}{3^n(2n+1)}=\sqrt{12}\sqrt{3}\frac{\pi}{6}=\pi$.