Computer Science Canada Is there any way to get Turing to calculate and display: |
Author: | Mark_Tran [ Mon Apr 17, 2006 12:45 pm ] |
Post subject: | Is there any way to get Turing to calculate and display: |
Is there any way to get Turing to calculate and display the first 1000 digits of Pi ? If there is can someone please post the code for it? That would be awesome ![]() |
Author: | cool dude [ Mon Apr 17, 2006 1:26 pm ] |
Post subject: | |
pi is infinite and turing doesn't have a built in function pi. if u wanted to u could make a constant and write out all the first 1000 numbers that pi has and store it in that constant so then u could just call the constant instead of typing out all those numbers. but i don't think turing can even handle that big of a number |
Author: | Andy [ Mon Apr 17, 2006 1:27 pm ] |
Post subject: | |
the simplest way is to use the Gregory approach.. but that'll take you a very long time to calculate 1000 digits. if all you want to do is to display it, then you can simply read the value off of here |
Author: | Delos [ Mon Apr 17, 2006 4:28 pm ] | ||
Post subject: | |||
cool dude wrote: pi is infinite and turing doesn't have a built in function pi.
Goes up to about 48 digits. |
Author: | [Gandalf] [ Mon Apr 17, 2006 4:33 pm ] | ||
Post subject: | |||
Heh, that's an amazing site address. cool dude wrote: pi is infinite and turing doesn't have a built in function pi. if u wanted to u could make a constant
Yeah, Turing doesn't have a function for pi, but it does have a constant for it:
|