Author |
Message |
santabruzer
![](http://www.pureoc.d2g.com/uploaded_images/9853.jpg)
|
Posted: Thu Nov 27, 2003 8:18 am Post subject: Pi |
|
|
Is it possible to write a pi program in turing, that will determine the value of pi to infinte decimals.... always wondered... |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Andy
|
Posted: Thu Nov 27, 2003 11:50 am Post subject: (No subject) |
|
|
not infinite... turing has limits, very small limits, and it'll crash at a couple of decimal places... but you can find pi using turing using the trig functions.. i think |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Thu Nov 27, 2003 12:13 pm Post subject: (No subject) |
|
|
Anyways, you can calculate pi using the chaos theory. I dont remember it exactly, but it involved the addition of random numbers. You might be surpriced, but thats actually how pi is calculated ![Laughing Laughing](images/smiles/icon_lol.gif) |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
Dan
![](http://wiki.compsci.ca/images/archive/3/3c/20100325043407!Danspic.gif)
|
|
|
|
![](images/spacer.gif) |
santabruzer
![](http://www.pureoc.d2g.com/uploaded_images/9853.jpg)
|
Posted: Thu Nov 27, 2003 6:18 pm Post subject: (No subject) |
|
|
hmm.. i dunnu i found some forumlas.. on google..
That page has that arctan forumula.. wonder if you can do that on turing |
|
|
|
|
![](images/spacer.gif) |
santabruzer
![](http://www.pureoc.d2g.com/uploaded_images/9853.jpg)
|
Posted: Thu Nov 27, 2003 6:21 pm Post subject: (No subject) |
|
|
code: | put 4*(arctan (1)) : 1: 48
|
Wonder what will happen if i export it to a file.. hmmm
Ha.. the max output for a number is 50 digits in turing.. hardly enough |
|
|
|
|
![](images/spacer.gif) |
Mazer
![](http://compsci.ca/v3/uploads/user_avatars/1323750815476d9f446d80c.png)
|
Posted: Thu Nov 27, 2003 6:53 pm Post subject: (No subject) |
|
|
not much.
you're trying to assign a real value to an integer, so turing isn't going to do anything but give you an error telling you so. and even if it did (ie, you change the int to a real), the result only has 6 decimal places (3.141593) |
|
|
|
|
![](images/spacer.gif) |
santabruzer
![](http://www.pureoc.d2g.com/uploaded_images/9853.jpg)
|
Posted: Thu Nov 27, 2003 6:54 pm Post subject: (No subject) |
|
|
not anymore .. sorry edited the previous post! |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Mazer
![](http://compsci.ca/v3/uploads/user_avatars/1323750815476d9f446d80c.png)
|
Posted: Thu Nov 27, 2003 7:10 pm Post subject: (No subject) |
|
|
well la-de-da |
|
|
|
|
![](images/spacer.gif) |
|