Viète's Formula for PI
06-23-2020, 09:58 PM
Post: #7
 pinkman Senior Member Posts: 432 Joined: Mar 2018
RE: Viète's Formula for PI
Quote:Yes, but it pales in comparison to the Wallis-Wasicki formula :-)

Here is a quick PPL port of your Wallis-Wasicki implementation:

Code:
 EXPORT WallisWasicki() BEGIN LOCAL i, k, m, n; LOCAL c, d, t, w;   PRINT("+---+-------------+------------+");   PRINT("| N |     2*W     |    2*W*C   |");   PRINT("+---+-------------+------------+");   FOR k := 1 TO 7 DO       n := 2*k;       w := 1;       c := 0;       d := 4*n;       m := n + 1;       FOR i := 1 TO k DO           t := i*(16*i - 8);           w := w*t*t/(t*(t - 2) - 3);           c := (m - 4)/(d + m/(2 - c));           m := m - 2         END;       c := 1 - c;       PRINT("|" + n + " |" + 2*w + " |" + 2*w*c + " |");     END;   PRINT("+---+-------------+------------+");   RETURN 2*w*c; END;

The terminal output is not well formatted, but still easy to read.

I’m also porting your 314 pi digits algorithm, I had to stop (work...) but it will be ready in a few hours (if I find the time).
 « Next Oldest | Next Newest »

 Messages In This Thread Viète's Formula for PI - pinkman - 06-17-2020, 05:06 PM RE: Viète's Formula for PI - ramon_ea1gth - 06-17-2020, 09:37 PM RE: Viète's Formula for PI - pinkman - 06-18-2020, 12:51 PM RE: Viète's Formula for PI - Gerson W. Barbosa - 06-19-2020, 11:12 PM RE: Viète's Formula for PI - Gerson W. Barbosa - 06-23-2020, 06:39 PM RE: Viète's Formula for PI - pinkman - 06-23-2020, 10:04 PM RE: Viète's Formula for PI - Gerson W. Barbosa - 06-23-2020, 10:52 PM RE: Viète's Formula for PI - cdmackay - 06-19-2020, 09:00 PM RE: Viète's Formula for PI - pinkman - 06-23-2020 09:58 PM RE: Viète's Formula for PI - Gerson W. Barbosa - 06-23-2020, 11:00 PM RE: Viète's Formula for PI - pinkman - 07-16-2020, 04:42 PM RE: Viète's Formula for PI - pinkman - 06-24-2020, 01:15 PM RE: Viète's Formula for PI - CyberAngel - 06-29-2020, 05:52 AM RE: Viète's Formula for PI - pinkman - 06-29-2020, 10:54 PM RE: Viète's Formula for PI - compsystems - 06-30-2020, 03:05 PM

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