Post Reply 
[VA] SRC#006- Pi Day 2020 Special: A New Fast Way to Compute Pi
03-21-2020, 07:21 PM
Post: #19
RE: [VA] SRC#006- Pi Day 2020 Special: A New Fast Way to Compute Pi
.
Hi Valentin

(03-19-2020 03:58 AM)Valentin Albillo Wrote:  
Quote:It seems to me that any strictly positive starting value less than pi will converge to pi - is that not so?

Yes[...] However, as the strictly positive starting value approaches 0, the number of iterations required to approximate Pi does increase (logarithmically) [...]and afterwards it will converge cubically to Pi.
Ah yes, good point.
Quote:
Quote:About the wonderful and unexpected rnd/rnd code: [...] Hmm. I must be missing something...

There are two possibilities [...]
Thanks for the thoughts, but I think it's something else.

Quote:This may or may not explain the difference but I have a question for you: have you entered my unmodified posted code in a physical or emulated HP-71B ? Does it produce the posted results ? If not, could you post the listing and the results you get ?
I hadn't, but now I have! (I even found how to run at full speed.) And indeed, of course, your two programs both produce the hoped-for results. No typo. There remains the question of my understanding, which is still missing a piece.

What's very curious to me is that you have two quite different final expressions in the two versions of the HP-71B rnd/rnd programs that you've posted. In the one-liner, you use the same form as my Basic port - you counted negatively and therefore perform a subtraction instead of an addition, but otherwise the same. In the multi-line version which you posted most recently, the final expression is quite different - and I don't (yet) understand why it should be.

Your earlier program: 1-4*N/K
My Basic port: 1+4*S%/N%
Your recent program: 5-P*4

Cheers
Ed
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [VA] SRC#006- Pi Day 2020 Special: A New Fast Way to Compute Pi - EdS2 - 03-21-2020 07:21 PM



User(s) browsing this thread: 1 Guest(s)