Skip to content

martian17/big-pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculating π using various fast-converging series

List of used algorithms

Machin-like formula

Machin-like formula
  • Hwang Chien-Lih's arctangent sum
  • F. C. M. Störmer's arctangent sum
  • Kikuo Takano's arctangent sum

Leibniz based formulas

Nilakantha's accelerated series for pi
  • Leibniz formula
  • Nilakantha's formula 1
  • Nilakantha's formula 2
  • Nilakantha's formula 3

Disclaimer: last few digits are wrong, so if you're going to use this program somewhere, make sure to throw away the last 10 or so digits

Brief description

This is my last day of calculating pi, so I put some effort on implementing multiple fast-converging series.
I implemented a small extension to the existing BigInt JavaScript feature to accomodate fraction arithmetics.
And for the arc-tangents I simply decomposed them into taylor-series and re-factored them as a sum

Demo
Github
Fork me on Github

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published