It was reported today that the record for pi is 31 trillion digits.
I don't know if this has been established already, if not, as a pi day challenge:
What is the most accurate approximation of pi that can be calculated using either the expanded or unexpanded ZX80?
Here are some suggestions for calculating pi:
https://en.wikipedia.org/wiki/Approximations_of_π
www.mathworld.wolfram.com/PiApproximations.html
Note, 10 PRINT "3.141592653589793" or similar, does not count.
Happy pi day  March 14th
A Program to Calculate Pi
The author claims over 8000 decimal places in 16K. Presumably more with extended RAM.
Regards;
Greg
Regards;
Greg
 Attachments

 Pi.gif (6.55 KiB) Viewed 2097 times

 Pi (Syntax v5n01).zip
 (9.13 KiB) Downloaded 77 times
Re: Happy pi day  March 14th
Very late in the day I know but somehow I missed this.
The author of this program also published it in Sync magazine minus the any key to continue thing but although the code looks the same it doesn't work very well. by that I mean every odd iteration the answer is miles out with PI starting as 3.14159... first time around then 3.175065.....then occasionally giving a correct result.
Is it possible any of our programming gurus could put me out of my misery because apart from the 2 different display methods it all looks the same to me?
The attached P file PI2 is the version published in Sync Vol 3 number 6 and P1 is the version kindly supplied by Greg.
The author of this program also published it in Sync magazine minus the any key to continue thing but although the code looks the same it doesn't work very well. by that I mean every odd iteration the answer is miles out with PI starting as 3.14159... first time around then 3.175065.....then occasionally giving a correct result.
Is it possible any of our programming gurus could put me out of my misery because apart from the 2 different display methods it all looks the same to me?
The attached P file PI2 is the version published in Sync Vol 3 number 6 and P1 is the version kindly supplied by Greg.
Re: Happy pi day  March 14th
Changing line 220 in pi2.p to the one in pi.p seems to help  so
Code: Select all
220 LET S=1
Re: Happy pi day  March 14th
Many many thanks for this Erik.
Just 1 character incorrect causes such error! It is very pleasing that there's always someone who will help those such as myself who are not so smart, I really do love this community and have learned so much from it.
Thanks again, Erik.
Fred.
Just 1 character incorrect causes such error! It is very pleasing that there's always someone who will help those such as myself who are not so smart, I really do love this community and have learned so much from it.
Thanks again, Erik.
Fred.