Its been a while since anyone posted here, so, I'm gonna start it up again... with some additional insights and perhaps some more fun...

First, there are many algorithms that will give you PI which converge faster than 4 * atan(1); this one, for instance:

16 * atan(1/5) - 4 * atan(1/239)

Try it in bc...

Secondly, there is a better way to get PI from the command line (faster, mostly) using python, and the decimal module. A couple of years ago I wrote a couple of py modules which add transcendental functionality to the decimal module of python (it is fast!)

pdeclib.py and pilib.py provide not only transcendental functions to python decimal, but also provide several algorithms for calculating PI from the command line using pure python.

This is the link for

pdeclib & pilib on PyPi.

I have noticed that on the PI 3B this still runs fast using Python2... but, is slower (big fat surprise) in Python3... which is just the opposite of what it should be... something is wrong upstream (still looking into it).

Enjoy