comppi



On 11/4/07, van Nek <van.nek at arcor.de> wrote:

> Meanwhile I was looking for a faster way to compute PI in Maxima.
> The best I found is a some kind of Ramanujan series by Chudnovsky & Chudnovsky.
> The computation mainly uses bignum calculations and is therefor faster than other
> algorithms which are based on bigfloat calculations (e.g. Borwein's recursive algorithms).
>
> I changed float.lisp/comppi and also wrote a new function float.lisp/compe which computes
> E by some modified Taylor series.

Sounds interesting, Volker, please tell us more.

Let's put some tests for this new code in the test suite.
I suppose this means we will need to identify a canonical source
of pi and e digits .... Also we need to be careful about bigfloat
comparison in the test code. At present the test code allows a
nonzero difference between expected and actual results.
Perhaps we'll need to phrase some tests as is(expected=actual),
i.e. test for literal equality. That may be too strict.

Wikipedia claims that Bill Gosper computed pi to 17*10^6 digits
via a Ramanujan formula in 1985. I think that was after his work
on Macsyma so I guess that code must not be in Maxima.

best

Robert