Pseudo code for calculating $\pi$ using an iterating algorithm?
pSo my question title says it all. What is the best way to calculate $\pi$
as an iterating algorithm that can be programmed into any application
(thus the pseudo code)?/p p$\pi$ Was first calculated using polygons and
how an internal perimeter (using a polygon) of a circle compared to the
external perimeter (using a polygon) am I correct in saying this? So there
must be a way to write the calculation as an iterating algorithm (in
pseudo code)./p pIn one of the answers, I found the following formula:/p
pimg src=http://i.stack.imgur.com/Sveb1.png alt=Formula/p pHowever, I do
not understand what it means as I am a novice in mathematics (only middle
school!). What I can make out is $\pi$ = $12 * \sum ((-1)^k*(6k)!(13591409
+ 545140134k) )/((3k)!*(k!)^3*640420^{3k+3/2})$ The sum function is
repeated to however many iterations needed. I don't understand the
variable $k$ or where the formula got the numbers e.g. (6k etc)./p
No comments:
Post a Comment