[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:Ah yes, good point.Quote:It seems to me that any strictly positive starting value less than pi will converge to pi - is that not so? Quote:Thanks for the thoughts, but I think it's something else.Quote:About the wonderful and unexpected rnd/rnd code: [...] Hmm. I must be missing something... 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 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)