Parts Catalog Accessories Catalog How To Articles Tech Forums
Call Pelican Parts at 888-280-7799
Shopping Cart Cart | Project List | Order Status | Help



Go Back   PeachParts Mercedes-Benz Forum > General Discussions > Off-Topic Discussion

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-14-2008, 03:14 PM
TheDon's Avatar
Ghost of Diesels Past
 
Join Date: Oct 2005
Posts: 13,217
happy Pi day everyone

and Einstein's Birthday as well


3.1415926 (thats as much as I can remember)

Reply With Quote
  #2  
Old 03-14-2008, 03:19 PM
Jordan G's Avatar
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
Reply With Quote
  #3  
Old 03-14-2008, 03:29 PM
SwampYankee's Avatar
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)
Reply With Quote
  #4  
Old 03-14-2008, 03:37 PM
Pete Geither's Avatar
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
Reply With Quote
  #5  
Old 03-14-2008, 05:25 PM
Crazy_Nate's Avatar
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)
\end{nerdy grad student randomness}
__________________
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
Reply With Quote
  #6  
Old 03-14-2008, 06:05 PM
miljohnj5's Avatar
Tout doit accélèrent.
 
Join Date: May 2007
Location: ...into that good night.
Posts: 106
Lightbulb 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
Reply With Quote
  #7  
Old 03-14-2008, 06:08 PM
Hogweed's Avatar
Watching SB LII every day
 
Join Date: May 2005
Location: in the back of beyond a.k.a. Pa.
Posts: 2,952
Quote:
Originally Posted by Crazy_Nate View Post
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.
Reply With Quote
  #8  
Old 03-14-2008, 08: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).
Reply With Quote
  #9  
Old 03-15-2008, 08:23 AM
SwampYankee's Avatar
New England Hick
 
Join Date: Sep 2006
Location: CT
Posts: 1,501
Quote:
Originally Posted by Matt L View Post
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)
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:26 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0
Copyright 2018 Pelican Parts, LLC - Posts may be archived for display on the Peach Parts or Pelican Parts Website -    DMCA Registered Agent Contact Page