Creating digits of pi
|
05-13-2018, 08:26 PM
(This post was last modified: 05-13-2018 08:28 PM by Gerson W. Barbosa.)
Post: #51
|
|||
|
|||
RE: Creating digits of pi
(05-13-2018 05:09 PM)SlideRule Wrote: I find … … a useful publication. I don't know it, but I am sure it is. Thanks for the book suggestion! Regarding the latest kind of series I've been experimenting with, I've found out that Wolfram Alpha is a good verifying tool. Just submit them to W|A and it will tell what it evaluates to. For instance, sum(k=1, ∞, (-1)^(k + 1)/((6k - 5)(6k - 3)(6k - 1))) = π/48 and sum(k=1, ∞, 1/((8k - 7)(8k - 5)(8k - 3)(8k - 1))) = π(2 - √2)/192 I'll stick to the former because I intend to use it in the hp 50g with no external libraries. Also, it can be implemented with only one division and one multiplication per term. Best regards, Gerson. -------------------------- >LIST 10 DESTROY ALL 12 INPUT K @ IF K=0 THEN END 15 S=0 @ Z=2*MOD(K,2)-1 @ W=Z 20 A=K*(K*(216*K-324)+138)-15 25 N=K*K @ M=2*K-1 30 FOR I=1 TO K 35 S=S+Z/A @ Z=-Z 40 N=N-M @ M=M-2 45 E=648*N+30 @ A=A-E 50 NEXT I 55 DISP 48*S;48*(S-W/(K*K*(432*K+600))) 60 GOTO 12 >RUN ? 1 3.2 3.15348837209 ? 2 3.13073593074 3.13893265205 ? 3 3.14521556875 3.14240262923 ? 4 3.13998510127 3.14127376106 ? 5 3.14243720856 3.14174155638 ? 10 3.14148304058 3.14158060156 ? 100 3.14159254249 3.14159265208 ? 372 3.14159265144 3.14159265359 ? 1500 3.14159265356 3.14159265359 I have yet to find the correcting continued fraction. The second value uses only the first correction term, which is not good enough for my purpose. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)