Pi Approximation – Wait Time and Polygon Signficance

After completing my post yesterday, I thought it would only take a few more lines of code to find the minimum number of sides to produce those 16 digits of pi accurately.  I wrote the lines and got frustrated with the wait time, hence I added more lines to my code to find the wait time for lower sequences of the correct pi calculation.  Currently, my computer has computed the minimum number of sides needed for the regular polygon for all digits between 2-15.  It has take a little over 2 hours.  The wait time is seemingly growing exponentially.  I’m going to post my code to calculate the wait time for a specefic amount of digits in pi in R and the code to find the wait time on your computer for approximating 16 digits of pi.  I’ll repost later with a regression curve to approximate the wait time for approximating pi with my current method.  I’m expecting to ofcourse use a log transformation.

start.string15 <- paste(Sys.time())
start.string15 <- paste(Sys.time())

I haven’t had the last 3 lines start or complete currently, but I’m expecting probably 3-6 hours of run time to find the number of sides needed to accurately approximate 16 digits of pi.


I’m about to finish here at work, but my computer seems to be stumped on approximating more digits soon.  Here is what I have so far:

digits time(seconds) sides (regular circum. and inscr.)
2 0 28
3 0 54
4 0 76
5 1 1050
6 1 1748
7 1 5177
8 1 42805
9 5 53280
10 17 207163
11 56 704426
12 159 1911702

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s