Thread: Happy Pi Day
View Single Post
Old 03-16-2009, 06:27 PM   #5
Patrick Donnelly
Senior Member
 
Patrick Donnelly's Avatar
 
Join Date: Aug 2007
Posts: 720
Default

Quote:
Originally Posted by Matthew Bacorn View Post
Not your kind of math though. Normal 8th grader math
I haven't thought of anything that spectacular since the eighth grade. It was really kind of luck that I found it anyway.

d = 1
r = 1/2
a[0] = r
b[0] = r
c[0] = sqrt(a[0]^2 + b[0]^2)

for i, as i goes to infinity
a[i+1] = c[i] / 2
b[i+1] = r - sqrt(r^2 - a[i+1]^2)
c[i+1] = sqrt(a[i+1]^2 + b[i+1]^2)
end

pi approx. = c[i]*4*2^i

Basically, it gives you the length of one side of a square for the first set of statements. When you go through the loop, it gives you one side of an octogon, then one side of a 16 sided figure, then one of a 32 sided figure, then one of a 64 sided figure, then one of a 128... etc. Multiplying that number by 4, 8, 16, 32, 64, 128,... etc. respectively will give you more and more accurate approximations of the circle's circumference. In this case, that's equal to pi, since d = 1.

Quote:
Originally Posted by Craig Loizides View Post
That reminds me of a math professor I had ...

http://en.wikipedia.org/wiki/John_Horton_Conway
Lucky.

Quote:
Originally Posted by Derek Maffett View Post
You must be studying to become an engineer or something similar, right? Ouch.
Physicist. Really, it's the easiest thing for me. That's just how I think.

For example, the other night, I was looking for a particular house, number 318, though I couldn't read the numbers on any of the houses because of the darkness, and I wasn't sure if I had passed it or not. So, I got out of the car, walked near to one house. Saw 308. Checked the next house down the street (in the direction of my travel) and saw it was 306. Therefore, dy/dx on that side of the street in my direction was equal to -2, a constant since house numbers are linear. So, 318 = -2x + 308, x = -5, and the house I wanted was 5 places in the opposite direction. I turned around, and counted the houses, 1, 2, 3, 4, 5. Number 318, bingo.


It's easy if you have the mind for it.
Patrick Donnelly is offline   Reply With Quote