Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
Pi
Author Message
santabruzer

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...

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
Tony

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
Tony's programming blog. DWITE - a programming contest.
Dan

Posted: Thu Nov 27, 2003 4:05 pm   Post subject: (No subject)

http://www.mcs.surrey.ac.uk/Personal/R.Knott/Fibonacci/fibpi.html

looks long tho, good look reading it all with out falling asleep
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
santabruzer

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
santabruzer

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
Mazer

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)
santabruzer

Posted: Thu Nov 27, 2003 6:54 pm   Post subject: (No subject)

not anymore .. sorry edited the previous post!
Mazer

Posted: Thu Nov 27, 2003 7:10 pm   Post subject: (No subject)

well la-de-da
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 9 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: