Follow Slashdot stories on Twitter


Forgot your password?

A Much Bigger Piece Of Pi 729

Punk_Rock_Johnny points to an AP story on Pi-obsessed Professor Yasumasa Kanada. A snippet from the story: "Kanada and a team of researchers set a new world record by calculating the value of pi to 1.24 trillion places, project team member Makoto Kudo said yesterday. The previous record, set by Kanada in 1999, was 206.158 billion places." Trillion! "
This discussion has been archived. No new comments can be posted.

A Much Bigger Piece Of Pi

Comments Filter:
  • by Hilleh ( 561336 ) <.moc.liame. .ta. .hellih.> on Saturday December 07, 2002 @11:00AM (#4832395) Homepage
    How come I can see this making a kick-ass distributed computing project? Pi@Home, here we come!
  • How? (Score:2, Interesting)

    by PoiBoy ( 525770 ) <(moc.sgnidlohiop) (ta) (nairb)> on Saturday December 07, 2002 @11:03AM (#4832406) Homepage
    Just how is Pi calculated? Are there any free apps available for Linux that I could look at to see how it is done?

  • by selectspec ( 74651 ) on Saturday December 07, 2002 @11:04AM (#4832412)
    Does the problem that pi can't be expressed in decimal notation extend to other base systems? For example, if you tried to write pi out in binary or hex would you encounter the same problem? Is there a special base system (other than base pi) which can describe pi in a finite number of digits?
  • Signature of God? (Score:5, Interesting)

    by Speare ( 84249 ) on Saturday December 07, 2002 @11:10AM (#4832438) Homepage Journal

    In the book version of Contact by Carl Sagan, but skipped in the Jodie Foster movie, was the notion that the aliens had discovered proof that the universe was created by a higher intelligence. A God or society of Gods far higher and more advanced than the aliens. The whole point of dragging Human-kind to that remote beach to talk with daddy was to tell Human-kind that it was time for them to look for God's signature on this universe.

    As any artist, the creator signed the creation. Where? Deep into the insignificant but irrefutably valid digits of several of the fundamental mathematical constants such as pi and e.

    The main character finds one of the signatures at the end of the book: if calculating digits of pi in base 11, after a few million or billion places, a 500x500 digit span is almost entirely zeros. If the span was rendered as a square of pixels, the non-zero digits drew a perfect circle inscribed in the square. A circle in a square. The key concept defining pi, in the digits of pi itself. The whole way the universe works is affected by that constant, so any such 'design' in it has, if you pardon the pun, a transcendental import.

    Why base 11? It's left to the reader to decide, but I expect Sagan wrote it because it is considered one of the possible designs of the universe, one of the string theories is based on an 11-dimensional all-inclusive physics model. As the alien explains to the main character, it wouldn't be base 10, because what's the likelihood that the creator also happened to have ten fingers?

  • How To Calculate Pi (Score:3, Interesting)

    by DrDevil ( 90608 ) on Saturday December 07, 2002 @11:10AM (#4832441) Homepage
    You can calculate Pi by doing:

    (1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + ..) x 4

    Obviously the more iterations you do, the closer you will be to the 'true' value of Pi.
  • by WesG ( 589258 ) on Saturday December 07, 2002 @11:12AM (#4832452)
    So if I did my math correctly:
    1240000000000 characters * 8 bits/character = 9920000000000 bytes

    9920000000000 bytes/ 1024000 = 9687500 MB

    9687500 MB = 9.6875 TB

    Thats a pretty darn big info.txt file!

    I think I'll just use the 32 byte version for my SIG. :-)

  • by agdv ( 457752 ) on Saturday December 07, 2002 @11:13AM (#4832455)
    No - pi is irrational

    Okay, I've heard this many times, and I don't doubt it's true. But are there any simple elegant proofs of this (like the one for proving that the square root of 2 is irrational), or are the proofs very involved, or are there no proofs at all except "well, nobody has found the end yet"?

  • Re:Signature of God? (Score:0, Interesting)

    by Anonymous Coward on Saturday December 07, 2002 @11:13AM (#4832459)
    after a few million or billion places, a 500x500 digit span is almost entirely zeros

    First off that is so stupid because it is totally impossible. How can you be doing the long division and get zero for every digit (with an occasional 1). Makes no sense. BAH!!

  • No, pi is irrational (Score:5, Interesting)

    by smcv ( 529383 ) on Saturday December 07, 2002 @11:23AM (#4832504) Homepage
    Pi is represented usually by a fraction or relatively simple equation, it's just the division that makes the number go on for ever.

    Nope. If pi was rational (a fraction), it wouldn't go on for ever without repeating. (reference [])

    In fact pi is irrational, i.e. there are no integers p, q such that pi = p / q. (proof [])

    You can approximate pi as a fraction, which is what projects like this do. (pi is approximately equal to 31/10, or 314/100, or 31416/1000, or ... but these are just approximations; 22/7 is a good enough approximation a lot of the time, but that's just an approximation too)
  • Re:How? (Score:1, Interesting)

    by Anonymous Coward on Saturday December 07, 2002 @11:25AM (#4832510)
    Just type
    echo "scale=500;4*a(1);"|bc -l
    in a shell, where 500 is the number of decimals you wish.
  • by slavemowgli ( 585321 ) on Saturday December 07, 2002 @11:34AM (#4832549) Homepage
    Well, at least pi is a computable number - other interesting ones, like Chaitin's Omega [], aren't, at least not ahead of time. In fact, if I recall correctly, it is even (provably) possible to construct Turing machines for which no single digit of Omega can be computed at all, but I'm not really sure about this anymore.
  • by release7 ( 545012 ) on Saturday December 07, 2002 @11:36AM (#4832559) Homepage Journal
    In the New York Times article about this story, Kanada has a team of researchers who have been working on this for five years. This undertaking is very sizable in both expense and effort. But when should we end the pursuit of finding pi to the nth digit? If pi is infinite, does this mean the amount of resources needed to calculate pi as accurately as possible is also infinite?

    So who sets the limits? Why didn't Kanada just let his computer algorithm run for another year or even just another few minutes to get an even more accurate number? Who decided 1.2 trillion digits was enough and why?

    It's just intersting to note that the measurement objective reality is always hampered by subjective, practical matters. And it might also prove that it is impossible for man to ever know the universe---it's just too damn expensive! I'm sure someone out there has thought about this before.

  • by isorox ( 205688 ) on Saturday December 07, 2002 @11:36AM (#4832562) Homepage Journal
    Why waste all that space? You can write any number from 0 to 255 in 1 byte, any number from 0 to 65355 in 2 bytes, and 0 to 4.2billion in 4 bytes.

    Anyone care to do the math about how much space you need (uncompressed)? (I cant cause I'm dumb)

    P.S. Does Pi compress very well?
  • by Hater's Leaving, The ( 322238 ) on Saturday December 07, 2002 @11:43AM (#4832591)
    What the heck is your calculation supposed to calculate?

    1.24T characters = 1.24TB
    at 1 character per byte.

    Simple as that.

    The data _could_ be represented as 4.12Tb = 515GB if it were converted to binary.
    However, you _really_ don't want to do radix conversion on numbers that large if you have the chance of avoiding it.

    If you wanted to store it in packed decimal instead:
    2 digits/byte (PBCD) : 620GB
    (4 digits/short likewise)
    9 digits/word : 551GB
    19 digits/64bits : 522GB

    So you can get within 1% of the minimum size (515GB) simply by packing the digits into 64bit words in chunks of 19 digits.

    (256bit chunks could hold 77 digits, and compress the size down to 515.3GB, which is .1% wastage)

  • by Phoenix ( 2762 ) on Saturday December 07, 2002 @11:48AM (#4832612)
    I'm not trying to be flamebait here, but I'm confused on why Math doesn't deal with reality very well.


    Using Standard measurements, a 10ft length can be split into three equal lengths of 3ft 4in.

    Why can't that same 10' length be broken with decimal math? Why is it infinitum?

    If I were to take a 10' length and bend it on itself so it made a circle I have a 10' circumfrence right? Then in theory I could get out my ruler and measure the radius and get a measurement that made sense. I can get real numbers by measuring, but the math doesn't agree...Why?
  • Re:PiHex (Score:2, Interesting)

    by Hater's Leaving, The ( 322238 ) on Saturday December 07, 2002 @11:52AM (#4832631)
    That's completely different. That was calculating a small set of distant (hex) digits, using the "Miraculous" Bailey Borwein Plouffe algorithm, not calculating the entire contiguous sequence of digits.

    Calculating the contiguous set of digits requires massive inter-node communications, as every part of the system has to know about every other part of the system. (Huge FFTs, which can be done in chunks, but after every step you need to recollate all the data. I 'simplify', of course)

    The MBBP algorithm can be chopped up into small chunks and assembled centrally, and therefore distributes very well.

    Colin Percival is 'on' slashdot, I'm sure he can provide more details (he was the mastermind behind the PiHex project).

  • For comparison... (Score:5, Interesting)

    by MarvinMouse ( 323641 ) on Saturday December 07, 2002 @12:05PM (#4832701) Homepage Journal
    A google only has 100 zeros, thus 100 places.

    10^trillion is 1 followed by 1 trillions 0's... Assuming we are following the american system that would be equivalent to.


    Okay... now.. let's get some interesting facts with this.

    The absolutely smallest length measurable by quantum theory is the planck length which is approx 10^-34 m. Needless to say, if we have a diameter of an incredibly small perfect circle, we'll know it's circumference beyond what is possible by quantum theory (but since there are no perfect circles, and quantum theory adds probability, this doesn't mean anything really useful. :-P)

    Now, since we know the smallest measurable... lets look at what the estimates for the size of the universe are. Recent estimates put it as 10 billion light years in radius source []
    Which works out to about... (assuming american notation on billion)

    10^9 * 300,000,000 m/s* 365*24*3600 ~= 10^25 m

    Okay... now if we were to measure the circumference to as accurate as allowed by quantum theory we'd have.

    pi*2.10^25 ~= 6.28*10^26 10^27 with an accuracy of about 34 decimals...

    So... to get perfect accuracy as allowed by quantum theory we would have at most 35 decimal places afterwards... therefore, we'd need pi with an accuracy of


    We have pi with an accuracy of 10^(10^12) which is
    63 : 10^12 ~= 1: 1.59x10^11
    Way more accuracy then we really need. :-)

    That's absolutely insane, but it is fun math.

    Just some food for thought.
  • by spac ( 125766 ) on Saturday December 07, 2002 @12:07PM (#4832714) Homepage
    Actually, to store a number this large it will have to be stored in IEEE 754 format.

    In IEEE 754 a string of either 32 bits is divided into a sign bit, 8 or more bits for the exponent, and 23 or more bits for the mantissa.

    You'll probably need a little more than 4119190837661 bits to tell you the truth.

    Then again, who cares.

    Only on slashdot....

    My Blog:
  • by Servants ( 587312 ) on Saturday December 07, 2002 @12:17PM (#4832760)

    Nope. Any number with a recurring pattern is automatically rational, and pi is not.

    This isn't too hard to see. For example, if pi repeated after 1.5 trillion digits, we could write its value (where [1.5tril] represents all those repeating digits:

    pi = 3.14159[1.5tril]..14159[1.5tril]..14159[..]

    Then multiply this number by 10^(1.5 trillion).

    10^(1.5trillion) * pi = 314159[1.5tril].14159[..]

    such that the repeating part starting with .14159 still follows the decimal point.

    Then subtract the top equation from the bottom one, so the repeating part gets subtracted away.

    (10^(1.5 trillion) - 1) * pi = 314159[1.5tril]

    Then just divide both sides by (10^(1.5 trillion) - 1) and you've written pi as a ratio of two integers.

  • 5 years (Score:2, Interesting)

    by alanak ( 451478 ) on Saturday December 07, 2002 @12:22PM (#4832783) Homepage
    my question is how exactly does it take multiple people 5 years to create a program to calculate pi. Granted, I have no experience in doing things like this - in fact I have no idea how to go about calculating pi to 30 digits nonetheless 1.3 trillion, but maybe 5 years seems excessively long.

    This was from the cnn article [].
  • Re:Signature of God? (Score:4, Interesting)

    by JanneM ( 7445 ) on Saturday December 07, 2002 @12:37PM (#4832843) Homepage
    No. The rearranging of bases, sizes, images and so on is just diluting it even more.

    Say we get a trillion digit sequence. Chances are that if you look long and hard enough, widening your parameters for what's acceptable enough, you will find something. Say you accept not just a perfect (according to some pixellization algorightm) circle exactly filling a 500x500 square in base eleven, but a pretty good approximation of any geometrical figure in any base up to some base and with an image size of anything from 32x32 up to those 500x500 - you suddenly have not just one chance per position in the sequence, but millions. That "Bible Code" scam worked exactly the same way - cast your net wide enough and you can't fail to find something.

    Have fun.
  • by SWPadnos ( 191329 ) on Saturday December 07, 2002 @12:41PM (#4832866)
    With a few extra bits, you can make it easy to extract any digit of the number.

    Split the 1.24TB number into triplets, and store each triplet in 10 bits:

    (leaving off the initial 3):
    141 592 653 ...
    encode into 30 bits:
    0010001101 1001010000 1010001101 ...

    Pack these together (and on and on), and you use only ~517 GB, but you can index to any digit by a simple division, shift, and decimal conversion.

    (assuming you decided to put together a RAID array for the storage in the first place :)

  • by scotch ( 102596 ) on Saturday December 07, 2002 @12:56PM (#4832920) Homepage
    Too bad the earth is not a sphere. A closer geometric approximation is "oblate spheroid". Don't forget also that the circumrance is all messy, with the mountains and building and trees and badgers and what not. Bot of these facts will be significant with the 27digit pie.
  • Re:Signature of God? (Score:1, Interesting)

    by Anonymous Coward on Saturday December 07, 2002 @12:59PM (#4832940)
    C'mon guys, don't you have any idea in math?

    Consider of what a probability would be to find such a pattern (250000 specific characters!!!) after just a few billion places in Pi. If anything can be close to zero, this is.

    Another problem would be why it is 500 by 500? If these guys love base 11 so much, I'd expect it to be 121x121 or something.
  • What about e? (Score:2, Interesting)

    by kazad ( 619012 ) on Saturday December 07, 2002 @06:59PM (#4834674) Homepage
    Has e been found to more decimal places? Pi and e are so related [Euler's equation, e^(i * pi) + 1 = 0], I wonder if precision in one will lead to precision in the other.
  • Re:Signature of God? (Score:2, Interesting)

    by xmda ( 43558 ) on Saturday December 07, 2002 @08:33PM (#4835007) Journal
    Well, it seems pi is normal, which means any finite sequence appears somewhere along the expansion of the number. So trivially, that image of a circle is in there somewhere, as is an image of a triangle, the source to Linux 4.0, an image of Bush playing with G.I. Joe dolls on his desk and so on.

    Exactly. A friend of mine thought he had come up with an ingenious compression scheme using this. Instead of storing the actual numbers in a file, store the position where that number can be found inside pi!

    This sounded a little bit too good to be true though, I supected that to find any number in pi you would sometimes have to scan quite far in the range of endless decimals. And I was right, often the position where the string could be found was a higher number than the number itself and in the end you're not compressing anything at all... :)

    Interesting idea though...

You know, Callahan's is a peaceable bar, but if you ask that dog what his favorite formatter is, and he says "roff! roff!", well, I'll just have to...