Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
User Journal

Journal JWSmythe's Journal: pi 7

So I set my computer off on a quest. The quest was, calculate pi. I found a chunk of PHP code that would do it.

3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912983367336244065664308602139494639522473719070217986094370277053921717629317675238467481846766940513200056812714526356082778577134275778960917363717872146844090122495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999837297804995105973173281609631859502445945534690830264252230825334468503526193118817101000313783875288658753320838142061717766914730359825349042875546873115956286388235378759375195778185778053217122680661300192787661119590921642002

    I'm not sure the code is optimal. I'm also not sure I want to have it keep doing circles. :) Primes sounds like fun.

This discussion has been archived. No new comments can be posted.

pi

Comments Filter:
  • You're missing a few digits, I think. :)

    •     It stopped at 1000, because that was the limit set into it. It ran from about 6pm to 8am to come up with 1000 digits.

  • ..if you use a different numbering system? I understand it is a ratio,just wondering if there is a theoretical number system that could handle it then.

    • by nizo ( 81281 ) *

      The answer is: 1

      Each digit is separated by the value of pi :-)

    • by Alioth ( 221270 )

      Pi is irrational, though. I suppose you could represent pi as 1 in base pi.

      • When I was in school, I thought a lot of things were irrational.

        One of my biggest was the concept that every teacher should assign 1 to 2 hours of homework per night per class. We had 7 classes per day. That was pretty simple math to figure out.

        School ran from 8:30 to 15:10. To catch the bus, I was out the door by 7:00, and wouldn't get home until 16:30. Allowing 30 minutes for organization of home tasks, and a 30 minute break for dinner, the soonest we could

"The medium is the massage." -- Crazy Nigel

Working...