Skip to main content

Posts

Showing posts from March, 2015

5 Methods for Approximating Pi

Happy super-π day! π-day falls on March 14 every year, because the month-day combination results in 3-14, which are the first 3 digits of π. But this π-day is particularly special: include the year, and you get 3-14-15, the first 5 digits of π. We won't get another π-day like this for another 100 years, so you better enjoy this one! A particularly special time will be at 9:26:53 PM tonight, when we'll get 3-14-15 9:26:53, or the first 10 digits of π. In honor of the occasion, I'm going to post 5 simple methods for approximating the value of π. 1. String and Tape Measure Draw a circle with a diameter of 1 foot and put a piece of string around the edge. Cut the string until it's the right length, and then measure it with a tape measure. The string should be about π feet long. This can be implemented more accurately using a computer program: take the arc length of √ (1 - x 2 ) on the interval (-1, 1). The result should be π. var pi = 0; var step = 0.0001; var previous = 0