Cart | Project List | Order Status | Help

 PeachParts Mercedes-Benz Forum happy Pi day everyone
 Register ShopForum Gallery FAQ Calendar Search Today's Posts Mark Forums Read

#1
03-14-2008, 04:14 PM
 Ghost of Diesels Past Join Date: Oct 2005 Posts: 13,225
happy Pi day everyone

and Einstein's Birthday as well

3.1415926 (thats as much as I can remember)

#2
03-14-2008, 04:19 PM
 Registered User Join Date: Sep 2007 Location: Lancaster, PA Posts: 389
5359....that's all the further I can go.

I memorized it off my ol' TI-85 graphing calculator.
__________________
1981 240d - 135k - Arlene
#3
03-14-2008, 04:29 PM
 New England Hick Join Date: Sep 2006 Location: CT Posts: 1,501
Cool! I'm going to celebrate by figuring out the circumference of the top of some beer cans as their volumes decrease.
__________________

1980 300TD-China Blue/Blue MBTex-2nd Owner, 107K (Alt Blau) OBK #15
'06 Chevy Tahoe Z71 (for the wife & 4 kids, current mule) '03 Honda Odyssey (son #1's ride, reluctantly) '99 GMC Suburban (255K+ miles, semi-retired mule) 21' SeaRay Seville (summer escape pod)
#4
03-14-2008, 04:37 PM
 Half Fast Moderator Join Date: Feb 2002 Location: Western Pa. Posts: 2,417
My granddaughter knows it 200 digits out. BTW,,, pie aren't square,,, pie are round. Cake are square.
__________________
95 SL500 Smoke Silver, Parchment 64K
07 E350 4matic Station Wagon White 34K
02 E320 4Matic Silver/grey 80K
05 F150 Silver 44K
#5
03-14-2008, 06:25 PM
 Registered User Join Date: Jan 2008 Location: Hampton Roads Posts: 567
Try this on for size...

You might even notice that I'm sitting in an airport and very bored...

Code:
count = 0
max = 1e5
for i = 0:max
x = rand;
y = rand;
if x^2+y^2 > 1
%do nothing
else
count = count+1;
end
end
pi = 4*count/max;
disp(pi)
__________________
1982 240D, sold 9/17/2008
1987 300D Turbo
W124.133 - 603.960, 722.317 - Smoke Silver Metallic / Medium Red (702/177), acquired 8/15/2009
262,715 and counting
#6
03-14-2008, 07:05 PM
 Tout doit accélèrent. Join Date: May 2007 Location: ...into that good night. Posts: 106
My life as a wannabe math geek

I'm not very good in math, in fact I'm a complete idiot when it comes to numbers. I do however, like the idea that math is a language, especially with the concept of Phi and the golden ratio. Check out this site, it's actually pretty cool;
http://goldennumber.net/
Sorry pi, it may be your birthday (you little transcendental number) but you're not consistently apparent in natures design, loser... Hail Phi!!! x 1.618
__________________
1985 300D / 175k

WISH LIST
29' HackerCraft - Gentleman's Racer...
http://www.hackerboat.com/html/29__gentleman_s_5.html
#7
03-14-2008, 07:08 PM
 Watching SB LII every day Join Date: May 2005 Location: in the back of beyond a.k.a. Pa. Posts: 3,134
Quote:
 Originally Posted by Crazy_Nate Try this on for size... You might even notice that I'm sitting in an airport and very bored... Code: count = 0 max = 1e5 for i = 0:max x = rand; y = rand; if x^2+y^2 > 1 %do nothing else count = count+1; end end pi = 4*count/max; disp(pi) \end{nerdy grad student randomness}
ouch. anybody got some 'cyber' aspirin?
__________________
0o==o0

James 4:8

"...let us put aside the blindness of mind of those who can conceive of nothing higher than what is known through the senses"
-Saint Gregory Palamas, ---Discourse on the Holy Transfiguration of Our Lord God and Savior Jesus Christ

Centrally located in North East Central Pa.
#8
03-14-2008, 09:54 PM
 Registered User Join Date: Oct 2005 Posts: 4,263
Aye, the "Monte Carlo" method for computing pi. Works fairly well. However, I recall reading about a closed-form solution a year or two ago. It only worked in binary (or another power of two, like hex) but that's good enough.

The point of the "Monte Carlo" algorithm is to throw dart at a 2x2 square, and of those darts that hit the square, count the number that are within a circle of radius 1. The area of the circle is pi, the area of the square is 4.

We must assume that "rand" returns a value between -1 and 1. Between 0 and 1 works too (I leave that as an exercise for the reader).
#9
03-15-2008, 09:23 AM
 New England Hick Join Date: Sep 2006 Location: CT Posts: 1,501
Quote:
 Originally Posted by Matt L Aye, the "Monte Carlo" method for computing pi. Works fairly well. However, I recall reading about a closed-form solution a year or two ago. It only worked in binary (or another power of two, like hex) but that's good enough. The point of the "Monte Carlo" algorithm is to throw dart at a 2x2 square, and of those darts that hit the square, count the number that are within a circle of radius 1. The area of the circle is pi, the area of the square is 4. We must assume that "rand" returns a value between -1 and 1. Between 0 and 1 works too (I leave that as an exercise for the reader).
Yeah, that!

__________________

1980 300TD-China Blue/Blue MBTex-2nd Owner, 107K (Alt Blau) OBK #15
'06 Chevy Tahoe Z71 (for the wife & 4 kids, current mule) '03 Honda Odyssey (son #1's ride, reluctantly) '99 GMC Suburban (255K+ miles, semi-retired mule) 21' SeaRay Seville (summer escape pod)

 Bookmarks

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OnTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

All times are GMT -4. The time now is 04:01 AM.

 -- Normal ShopForum Style ---- Copy of Normal ShopForum Style -- Pelican_Mobile Contact Us - Pelican Parts Mercedes-Benz Catalog - Archive - Privacy Statement - Terms of Service - Top