Viète's Formula for PI
06-19-2020, 11:12 PM
Post: #5
 Gerson W. Barbosa Senior Member Posts: 1,594 Joined: Dec 2013
RE: Viète's Formula for PI
(06-18-2020 12:51 PM)pinkman Wrote:  Compared to Wallis formula (https://www.hpmuseum.org/forum/thread-14...ght=wallis), it's absolutely fast!

Yes, but it pales in comparison to the Wallis-Wasicki formula :-)

+---+---------------------+---------------------+
| N |         2*W         |        2*W*C        |
+---+---------------------+---------------------+
| 2 | 2.84444444444444444 | 3.14385964912280701 |
| 4 | 2.97215419501133786 | 3.14158816337302932 |
| 6 | 3.02317019200136082 | 3.14159266276745771 |
| 8 | 3.05058999605551092 | 3.14159265357083669 |
|10 | 3.06770380664349896 | 3.14159265358983256 |
|12 | 3.07940134316788626 | 3.14159265358979314 |
|14 | 3.08790206983111306 | 3.14159265358979321 |
+---+---------------------+---------------------+

Only 7 iterations (or 14, depending on how you implement the algorithm) for 18 correct decimal digits
(21697209162666264236130304/6906436179074198667175275 = 3.141592653589793238[633]...).
The Pascal code is available here. It should translate easily into the Prime programming language, but probably no joy with only 12 significant digits...
 « 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)