[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Computing Pi on the Apple II and //e.



On Aug 10, 11:59 pm, Charles Richmond <friz...@tx.rr.com> wrote:
> datajerk wrote:
> > In the Aug/Sept 1978 issue of Micro Magazine Robert Bishop published
> > an Integer Basic program to compute the first 1000 digits of Pi.  It
> > took ~40 hours.
>
> > Did anybody ever improve on this benchmark?
>
> Bob Bishop's "Apple Pi" article originally published in Micro
> magazine at:
>
> http://bob-bishop.awardspace.com/ApplePi/index.html
>
> The Apple BASIC source code is included in the article.

Thanks for the link.  I also found it from a different source:

http://www.6502.org/documents/publications/micro/micro_6_aug_1978.pdf

> On my Linux box a few years ago, I recoded this algorithm in C and
> computed at least 100,000 digits of PI. To check my result, I
> downloaded the value of PI to 1 megadigit from a Gutenberg site
> and wrote another program to compare the digits downloaded with
> the digits computed.

The algorithm used is based on the very popular Machin Arctan
formula.  I found a C version and compiled it with Aztec C for the //e
(http://sense.net/~egan/apple2e_aztec_c/pi.c).  It runs in ~37
minutes.

I also gave FORTH a try.  My own implementation of the same formula in
Mad Apple Forth ran in just under 25 minutes.

I was hoping before publishing my results in another online forum that
I could reference other attempts, but so far I have found none.

Thanks.