Slashdot Mirror


New Pi Computation Record Using a Desktop PC

hint3 writes "Fabrice Bellard has calculated Pi to about 2.7 trillion decimal digits, besting the previous record by over 120 billion digits. While the improvement may seem small, it is an outstanding achievement because only a single desktop PC, costing less than $3,000, was used — instead of a multi-million dollar supercomputer as in the previous records."

47 of 204 comments (clear)

  1. Verification by Tukz · · Score: 3, Interesting

    I didn't read the article, only the summery but it made me wonder.

    Do they verify these numbers somehow?
    Anyone can write down a series of a numbers and claim it's a specific sequence.

    Not saying these numbers aren't correct, just a thought.

    --
    - Don't do what I do, it's probably not healthy nor safe. -
    1. Re:Verification by msclrhd · · Score: 3, Informative

      In TFA (especially the PDF), the verification method is to use another algorithm to check the output. The PDF on Fabrice's home page goes into more details.

      NOTE: The machine they were using to generate the second result broke, so they used another (3rd) algorithm to generate the last digits.

    2. Re:Verification by David+Jao · · Score: 4, Interesting

      I didn't read the article, only the summery but it made me wonder.

      Do they verify these numbers somehow? Anyone can write down a series of a numbers and claim it's a specific sequence.

      Not saying these numbers aren't correct, just a thought.

      Perhaps this is why you should read the article. The press release answers this question directly.

      The binary result was verified with a formula found by the author with the Bailey-Borwein-Plouffe algorithm which directly gives the n'th hexadecimal digits of Pi. With this algorithm, the last 50 hexadecimal digits of the binary result were checked. A checksum modulo a 64 bit prime number done in the last multiplication of the Chudnovsky formula evaluation ensured a negligible probability of error.

      The conversion from binary to base 10 was verified with a checksum modulo a 64 bit prime number.

    3. Re:Verification by Xest · · Score: 2, Interesting

      The implementation (compiled or uncompiled) is in itself an algorithm which can equally be checked because the language follows pre-defined logical rules which may act as axioms or depending on the details of the algorithm it may be trivial to just use induction.

      It's not like we're checking a full operating system or office suite here, so size isn't a restrictive problem in such a proof.

      It may be that the processor itself hasn't been checked so that the results of executing that algorithm isn't correct either, but again, when it's the algorithm that matters, who cares? We know the specifications of the language which may effectively act as axioms in a proof. The compiler may not be valid certainly, but as long as the algorithm (yes, mathematical and implementation) is correct then that is what matters.

      It is down to anyone then using the algorithm to ensure the other layers are correct enough for their purposes.

    4. Re:Verification by Terje+Mathisen · · Score: 2, Interesting

      Verification as actually quite easy, due to the (totally unexpected at the time!) discovery of the Borwein-Bailey-Plouffe algorithm which allows you to directly calculate the N'th hexadecimal digit of pi, without having to determine any other digits.

      He used this on a bunch of the last digits and they all came out correct, which makes the probability of an error extremely small.

      Last year I used his algorithm to calculate 1e9 (i.e. a US billion) digits of pi and made them searchable:

      http://tmsw.no/pi-search/

      Try to enter any string of digits, like a full 8-digit birth day: The odds are good that pi-search will locate it somewhere.

      Terje

      PS. Yes, I did use his table just now to verify that my own digits are correct. :-)

      --
      "almost all programming can be viewed as an exercise in caching"
  2. Thats nice and all... by fliptw · · Score: 2, Funny

    But will it help us in getting flying cars?

    1. Re:Thats nice and all... by LostCluster · · Score: 5, Funny

      Only if you avoid the square routes.

  3. One thing to say by DirtyCanuck · · Score: 5, Informative

    From the FAQ

    "How does your record compares to the previous one ?
    The previous Pi computation record of about 2577 billion decimal digits was published by Daisuke Takahashi on August 17th 2009. The main computation lasted 29 hours and used 640 nodes of a T2K Open Supercomputer (Appro Xtreme-X3 Server). Each node contains 4 Opteron Quad Core CPUs at 2.3 GHz, giving a peak processing power of 94.2 Tflops (trillion floating point operations per second).

    My computation used a single Core i7 Quad Core CPU at 2.93 GHz giving a peak processing power of 46.9 Gflops. So the supercomputer is about 2000 times faster than my computer. However, my computation lasted 116 days, which is 96 times slower than the supercomputer for about the same number of digits. So my computation is roughly 20 times more efficient. It can be explained by the following facts:

            * The Pi computation is I/O bound, so it needs very high communication speed between the nodes on a parallel supercomputer. So the full power of the supercomputer cannot really be used.
            * The algorithm I used (Chudnovsky series evaluated using the binary splitting algorithm) is asymptotically slower than the Arithmetic-Geometric Mean algorithm used by Daisuke Takahashi, but it makes a more efficient use of the various CPU caches, so in practice it can be faster. Moreover, some mathematical tricks were used to speed up the binary splitting. " ( http://bellard.org/pi/pi2700e9/faq.html )

    Mathematical and Programming Ownage.

    1. Re:One thing to say by Anonymous Coward · · Score: 4, Funny

      HE USED TRICKS!!!!1111Burn the witch...eehh communist...eeeh climate researcher...eeeeh....PI guy.

    2. Re:One thing to say by PinkyGigglebrain · · Score: 4, Interesting

      An answer is a reply but a reply is not always an answer.

    3. Re:One thing to say by digitalhermit · · Score: 4, Insightful

      In another thread someone had posted that there was no reason for any modern CPUs; the idea being that anything one could reasonably want to do with a computer was possible with decade old hardware.

      This.. *This* article is why I enjoy the breakneck pace of processor speed improvements. The thought of being able to do some pretty serious computing on a relatively inexpensive bit of hardware -- even if it takes half a year to get results -- does what the printing press did. It allows the unwashed masses (of which I am one) a chance to do things that were once only the realm of researchers in academia or the corporate world. Sure, all that you need to do some serious mathematics is a pen and paper, but more and more discoveries occur using methods that can only be performed with a computer.

      There's always the argument that cheap computers and cheap access to powerful software pollutes the space with hacks and dilletantes. People have said this about desktop publishing, ray tracing, and even the growth of Linux. But it's this ability to do some amazing things with computers that makes it all worthwhile.

    4. Re:One thing to say by HateBreeder · · Score: 3, Interesting

      I would assume he only needs to verify the last 120 billion digits.

      Assuming his algorithm can support serialization of its state into a check-point, he can simply recalculate the last 120 billion digits a couple of times and compare.

      Assuming linear time to compute each digit: 120e9/2.7e12 * 116 =~ 5 days. not too bad.

      --
      Sigs are for the weak.
    5. Re:One thing to say by Le+Marteau · · Score: 3, Funny

      > It hides an answer to some questions for sure.

      Could be. I'm not sure the answer will be in base 10, though.

      Maybe, in base 36, beginning at the trillionth digit, pi is:

      "URTEHSUXXORUNEED2GETALIFESRSLYKTHXBYE"

      That would be amazing.

      --
      Mod down people who tell people how to mod in their sigs
    6. Re:One thing to say by Lord+Lode · · Score: 2, Interesting

      Hmm, for such a record attempt, do you actually have to calculate all these earlier digits? They're already known. Can anyone prove the computer calculated the already known digits first (instead of getting them from a table) before finally getting to the 120 million new ones?

    7. Re:One thing to say by dtmos · · Score: 2, Funny

      Of course, the first step in your plan is to calculate the digits in the first place...

    8. Re:One thing to say by stephentyrone · · Score: 2, Insightful

      Pi is interesting in that regard -- there are algorithms that can compute the Nth digit without needing to compute the intermediate digits. If you want to compute all digits from 0 to N, however, there are more efficient algorithms.

  4. Finally! by pEBDr · · Score: 5, Funny

    Now I can finally get somewhat reasonable precision when calculating the radius of stuff!

    1. Re:Finally! by asc99c · · Score: 2, Funny

      You'd also need something to prop up the other end of the new extended screen to display the number - Venus should be in about the right place when it gets a bit closer!

    2. Re:Finally! by Anonymous Coward · · Score: 2, Interesting

      There is a program package for Linux called Sage math where you can get a lot of digits in your constants. For example, to accurately calculate the circumference of a circular table with diameter=1000 mm you could type:

      1000*pi().n(digits=1000000)

      All you need now is a decent measuring tape...

      These two also work, in case you're worried about not getting good enough accuracy when you calculate Fourier coefficients or something:

      (pi().n(digits=1000000))^2
      (pi().n(digits=1000000))^3

      Since Sage sets up a web server on your computer you can even do this inside a decent phone web browser, so you can get that precision out in the field, where you need it. :-)

    3. Re:Finally! by HTH+NE1 · · Score: 2, Insightful

      I think you'll find you don't need anywhere near that level of precision of pi to find the radius of the Universe in Planck lengths. 50 digits is sufficient.

      --
      Oh, say does that Star-Spangled Banner entwine / The myrtle of Venus with Bacchus's vine?
  5. this guy has a pretty impressive track record by Trepidity · · Score: 5, Informative

    For those not previously familiar with Fabrice Bellard, he's known for:

    • LZEXE, very popular in the early 1990s as the first EXE-shrinker for DOS, or at least the first widely available one
    • ffmpeg, video decoding library which he started and headed for a number of years
    • QEMU, dynamic-translating generic emulator
    1. Re:this guy has a pretty impressive track record by msclrhd · · Score: 5, Informative

      He also wrote the Obfuscated Tiny C Compiler (http://bellard.org/otcc/) in 2002 for the Obfuscated C contest, where otcc could compile itself. This became the Tiny C Compiler (TCC) which was picked up by Robert Landley (but subsequently dropped a while later) that is a capable, fast C90/C99 compiler.

      His projects page (http://bellard.org/) and the older projects (http://bellard.org/projects.html) contain a lot of interesting projects.

      Also of note: Fabrice achieved the record for Pi computation in 1997 as well:
            http://bellard.org/pi/pi_hexa.html
            http://bellard.org/pi-challenge/announce220997.html
            http://bellard.org/pi/

    2. Re:this guy has a pretty impressive track record by Rapha222 · · Score: 2, Insightful

      Does this guy is God ?

  6. Re:Wow... by MichaelSmith · · Score: 3, Interesting

    Plain html is a wonderful thing. And as he points out, it would be easy to write a cgi script which returns a specified block of digits.

    I wonder if he has checked for the circle?

  7. Specs from the PC in question by c0mpliant · · Score: 4, Informative

    Core i7 clocking at 2.93GHz 6GB RAM 5 1.5TB Hard Drives (At least 7.2TB needed to store final result and base conversion)

    He will be releasing the program he created for Windows (64bit only) and Linux

    --
    There is no -1 disagree
    1. Re:Specs from the PC in question by l0b0 · · Score: 2, Informative

      He will be releasing the program he created for Windows (64bit only) and Linux

      PS: Not the source

  8. He needs some help... by LostCluster · · Score: 5, Funny

    1 TB data files... somebody needs to help him with the compression! Oh, wait a minute.

  9. Re:silly by Trepidity · · Score: 5, Informative

    As he points out himself, he doesn't really care about calculating digits of Pi; it's a convenient hook on which to hang an interesting algorithms challenge. From the FAQ:

    I am not especially interested in the digits of Pi, but in the various algorithms involved to do arbitrary-precision arithmetic. Optimizing these algorithms to get good performance is a difficult programming challenge.

    He also mentions elsewhere that of his code, "The most important part is an arbitrary-precision arithmetic library able to manipulate huge numbers stored on hard disks."

  10. Re:So... umm... by MichaelSmith · · Score: 3, Insightful

    Could someone fill me in what purpose that may be?

    Because.

  11. Re:So... umm... by Trepidity · · Score: 3, Informative

    He mentions in the "press release" page that the most important thing developed in his code is "an arbitrary-precision arithmetic library able to manipulate huge numbers stored on hard disks", which sounds basic-research-y. There's some more on that in the technical-details PDF, although unfortunately he says he doesn't plan to release the code (somewhat unusual, since most of his projects are free software).

  12. Re:silly by David+Jao · · Score: 3, Insightful

    There is an algorithm now for calculating the nth digit of Pi at a whim.

    The algorithm only works for hexadecimal digits. There is no known formula or algorithm for calculating the n-th decimal digit directly.

    Having said that, the existence or non-existence of an n-th digit algorithm does not have any relevance on the silliness or non-silliness of computing trillions of digits of pi, unless the algorithm is extremely trivial (i.e. computing the digit takes less CPU time than a byte of I/O), which is not the case here.

  13. I'm not impressed - Superman was faster than a by anti-NAT · · Score: 2, Funny

    speeding bullet, and was able to leap tall buildings in a single bound. Fabrice needs to lift his game.

    --
    The Internet's nature is peer to peer - 20050301_cs_profs.pdf
  14. Re:Did he find a message? by Dahamma · · Score: 2, Funny

    Exactly! And hence the discovery of our blessed lady of the grilled cheese sandwich...

  15. Re:So.... by Fjodor42 · · Score: 2, Informative

    Read... The... Fine... (wait for it) Article!

    Spoiler alert!

    He developed a highly efficient library for arbitrary precision floating-point number calculations, capable of having a desktop machine best a supercomputer. Now go change your signature to "For lack of a better question..." ;-)

    --
    "The number you have dialed is imaginary. Please rotate your phone 90 degrees and try again."
  16. Re:Pattern? by Trepidity · · Score: 2, Interesting

    Depends on what you mean by "pattern", of course, but pi is conjectured to be normal, which would exclude many sorts of patterns. It's not proven, though.

  17. Too bad... by hallux.sinister · · Score: 5, Funny
    Only another four hundred billion decimal places, and they would have found the last one!

    ~Hal

  18. Re:silly by Bacon+Bits · · Score: 2, Interesting

    Knowing how to calculate the nth digit of Pi itself is slightly retarded.

    The observable universe is about 50 billion light years across, which is about 4.27 * 10^26 meters. If we take a ring of atoms each roughly 1 Angstrom (10^-10 meters) apart with a diameter the size of the observable universe and want to determine the circumference of the resulting circle, then knowing Pi to 40 or so places is sufficient that the error caused by the atoms themselves is greater than that introduced by using an approximate value for Pi. Knowing Pi to 40 or so places is sufficient that you can calculate the difference in circumferences of the inner diameter of the ring and outer diameter of the ring.

    Knowing Pi to 40 places is basically sufficient for describing our entire universe and anything you could put into it. We've known the first 35 for four hundred years, and we've never needed that much information to describe our universe.

    --
    The road to tyranny has always been paved with claims of necessity.
  19. Re:silly by Ambiguous+Puzuma · · Score: 4, Informative

    There is no known formula or algorithm for calculating the n-th decimal digit directly.

    What about this?

    I present here a way of computing the nth decimal digit of pi (or any other base) by using more time than the [BBP] algorithm but still with very little memory.

  20. Re:So... umm... by JasterBobaMereel · · Score: 4, Informative

    Basic research ..... you know that stuff that has no useful application now .....especially maths

    Like group theory, invented in 1832 by Évariste Galois, had no really useful application until the mid 20th century ... Now quantum mechanics and so most of modern electronics uses it ....

    --
    Puteulanus fenestra mortis
  21. Would have been nice to see some code. by flimflammer · · Score: 2, Insightful

    I don't think many people will be running his program that takes 116 days to complete to get as far as he did. Would have been nice to at least see how the code worked.

  22. I'm building an atomic bomb. by tjstork · · Score: 3, Funny

    It allows the unwashed masses (of which I am one) a chance to do things that were once only the realm of researchers in academia or the corporate world

    I agree, that's why I have great hopes for my atomic bomb.

    --
    This is my sig.
  23. Re:Did he find a message? by ettlz · · Score: 2, Funny

    Well given (I think, though may be wrong on this) that pretty much any finite sequence of digits will show up in the decimal expansion of pi at some point, there should be a raster image of a circle in 1s and 0s buried in it somewhere. Along with a greyscale raster of Goatse.

  24. I calculated pi to the last digit... by stox · · Score: 3, Informative

    in base pi. The answer was 10.

    --
    "To those who are overly cautious, everything is impossible. "
  25. Re:Did he find a message? by ceoyoyo · · Score: 2, Interesting

    In any large enough collection of random numbers you will be guaranteed to find whatever pattern you're looking for, whether it's a hundred thousand zeros in a row or the text of the collected works of Shakespeare. You can test statistically how likely you are to find particular patterns in a collection of numbers of a particular size though.

    Finding patterns can be hard. If you have an idea of what you're looking for you can do much better than if you just want to find any pattern. SETI at Home has a page about what they look for: http://seticlassic.ssl.berkeley.edu/about_seti/about_seti_at_home_4.html

  26. Thumbs Up, Fabrice! by cfriedt · · Score: 2

    Fabrice Bellard continues to amaze me.

  27. Re:silly by David+Jao · · Score: 2, Informative

    There is no known formula or algorithm for calculating the n-th decimal digit directly.

    What about this?

    I present here a way of computing the nth decimal digit of pi (or any other base) by using more time than the [BBP] algorithm but still with very little memory.

    The algorithm you linked to requires cubic time in n. It hardly qualifies as "calculating the n-th decimal digit directly" given that the naive approach (calculating every single digit between 1 and n, and throwing away all but the last digit) is faster than cubic time.

    The only advantage of the algorithm you linked to is that it requires constant space.

  28. Re:silly by sproingie · · Score: 2, Interesting

    Angstroms are awful big. Just for the sake of maximum precision, how many digits would you need if you were measuring in planck lengths?