How to get many places of pi from Machin's Equation?

Mark Dickinson dickinsm at gmail.com
Sat Jan 9 10:31:18 EST 2010


On Jan 9, 11:31 am, "Richard D. Moores" <rdmoo... at gmail.com> wrote:
> Is there a way in Python 3.1 to calculate pi to greater accuracy using
> Machin's Equation? Even to an arbitrary number of places?

There's no arbitrary-precision version of atan included with Python.
You could write your own (e.g., based on argument reduction + Taylor
series) for use with the decimal module, or you could use one of the
various 3rd party arbitrary-precision arithmetic packages that do
provide atan.

Mark



More information about the Python-list mailing list