Skip to content

Computing π

Oscar Veliz edited this page Aug 31, 2020 · 4 revisions

Machin-like formula video

The video covering Machin-like formula can be found at https://youtu.be/M_fTdDx8IlY. Example code is given in Machin.lsp, written in CLISP. The code can be run online via CodingGround. To run locally have CLISP installed then type clisp Machin.lsp in the terminal in the directory where Machin.lsp is saved. If you would rather compile it first, use clisp -c Machin.lsp then clisp Machin.fas.

Use 333 binary digits of pi for 100 decimal digits requiring about 75 iterations per arctangent. For 10,000 decimal digits of precision for pi use 33220 binary digits and around 7160 iteration terms. If interested in how CLISP computes pi see CLISP's source code.

Reference links:

Sublinear Convergence

Sublinear Convergence video

The video covering the sublinear convergence order of the Gregory-Leibniz series can be found here with code here with the ability to run online via CodingGround.