[VA] SRC #016 - Pi Day 2024 Special
|
03-17-2024, 05:21 PM
Post: #14
|
|||
|
|||
RE: [VA] SRC #016 - Pi Day 2024 Special
(03-17-2024 04:05 PM)Gerson W. Barbosa Wrote: 3rd, on the hp 50g emulator: This is a nice use of both the 50G's summation function and the log function. A similar code on the 71b gives: >S=0 @ FOR N=1 TO 1E5 @ S=S+LOGP1(-1/N/N/100) @ NEXT N @ DISP 5*2/(1+SQR(5))/EXP(S) 3.14159233937 The ∑ function probably accumulates the sum with extended 15-digit accuracy, thus a slightly different result. We can improve a little bit the 71B's code by summing backward: >S=0 @ FOR N=1E5 TO 1 STEP -1 @ S=S+LOGP1(-1/N/N/100) @ NEXT N @ DISP 5*2/(1+SQR(5))/EXP(S) 3.14159233943 and this is the value I get with Free42 (to 12 digits). But at the end this doesn't improve the approximation of pi. J-F |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)