comppi



Richard Fateman wrote:
> I haven't looked at it, but I think I copied it from some continued fraction
> approximation in Hakmem, probably written out by Bill Gosper.
> There are likely faster-converging formulas known now.

For the record, here is a very brief translation of the algorithm.  I 
have no idea what the algorithm is, but perhaps this translation will help.

comppi computes pi to n bits, and (comppi n) / 2^n is pi.

comppi(n) :=
   block([a : 2^n, b, c],
     b : floor(a/8),
     c : 3*a+b,
     for i : 4 step 2 while b > 0 do
       block([],
         b : floor((b*(i-1)^2)/(4*i*(i+1))),
         c : c + b),
     c)$

> 
> This brings up an interesting issue:  the file float.lisp was originally
> written by me, but large parts were added by others (Raymond Toy, perhaps?).

Yes, I have modified parts of it, but mostly to fix a few minor bugs and 
a few small additions.

> Almost all the authorship is removed, and the copyright at the top mentions
> only Bill Schelter.  I think I understand Bill's motivation in putting his
> copyright on every file, but to a novice it might suggest that Bill actually
> wrote all the code.  In some files he did.  In other files I suspect the
> only change he made was to put the copyright message on the top. 
> 
> My suggestion is that any time a change is made in the code, the author's
> name is attached to the code.  Not everyone is going to have the source code
> control system available.

I wouldn't go so far as saying you need to attach your name.  But if you 
contribute something "big" and new, why not?

Something I would much rather see is that people document what they 
find.  Most of maxima is uncommented, so if you've spent a fair amount 
of time figuring out how something works, please write a few comments 
about how it works or what it's supposed to do, or whatever.  Then the 
next person won't have to spend as much time to figure it all out again, 
and again and again.

Also, the source code control system is always available via

http://maxima.cvs.sourceforge.net/maxima/

You kind of have to know what you're looking for, but it's all there.

Ray