Page 1 of 1

Happy pi day - March 14th

Posted: Thu Mar 14, 2019 7:21 pm
by ZX79
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. :-)

A Program to Calculate Pi

Posted: Tue Apr 16, 2019 10:26 pm
by GCHarder
The author claims over 8000 decimal places in 16K. Presumably more with extended RAM.

Regards;

Greg

Re: Happy pi day - March 14th

Posted: Tue Jul 16, 2019 6:36 pm
by Moggy
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.

Re: Happy pi day - March 14th

Posted: Wed Jul 17, 2019 8:02 am
by olofsen
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

Posted: Wed Jul 17, 2019 2:46 pm
by Moggy
Many many thanks for this Erik. :D

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.

Re: Happy pi day - March 14th

Posted: Tue Oct 15, 2019 5:28 pm
by stefano
Very late.. but this article must be in the loop:

https://github.com/z88dk/z88dk/wiki/pi