[Coco] Invent a new way to calculate Pi
Richard Goedeken
Richard at fascinationsoftware.com
Mon Sep 18 22:11:43 EDT 2023
I have a little contest that I started a few months ago amongst all my retro
computer friends, to compare the BASIC interpreter speed of all the different
8-bit computers against each other. The Coco 3 is one of the fastest,
currently only bested by the Apple IIc accelerated to 4MHz.
The algorithm that I'm using to run the benchmark is called SPIGOT and
produces digits of Pi by using only integer math and a memory storage array.
You can find the scorecard in this Google doc:
https://docs.google.com/spreadsheets/d/1Zlicfj__PcycbKEbfoiYRijUZh1dqujWPXgh6Um9YO4/edit?usp=sharing
The reference BASIC code is also on that document, in the second tab of the
spreadsheet.
Richard
On 9/18/23 09:26, gene heskett via Coco wrote:
> On 9/18/23 09:36, John Mark Mobley via Coco wrote:
>> I have an idea for a programming chainage...
>>
>> I have a strange idea that I can use a crude value of Pi to calculate a
>> better value of Pi. And you can repeat this process a number of times until
>> you get a much better value of Pi.
>>
>> I found that I can use the Pythagorean theorem to calculate Pi to a few
>> places like 3 or 6 places with only perhaps 10,000 triangles. I know that
>> there are better ways to calculate Pi, but this is a way that I actually
>> understand how it works.
>>
>> Enjoy!
>>
>> -John Mark Mobley
>> Glenside Color Computer Club, Inc. Vice-President
>>
> Chuckle, BTDT, John. Somewhere in our Rainbow history is an article on machine
> code that calculates pi to 500 places. How accurate however, wasn't mentioned
> that I recall nearly 40 years later.
>>
>>
>
> Cheers, Gene Heskett.
More information about the Coco
mailing list