Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Math Cloud Google Technology

Google Smashes the World Record For Calculating Digits of Pi (wired.co.uk) 132

Pi just got bigger. Google's Compute Engine has calculated the most digits of pi ever, setting a new world record. From a report: Emma Haruka Iwao, who works in high performance computing and programming language communities at Google, used infrastructure powered by Google Cloud to calculate 31.4 trillion digits of pi. The previous world record was set by Peter Trueb in 2016, who calculated the digits of pi to 22.4 trillion digits. This is the first time that a publicly available cloud software has been used for a pi calculation of this magnitude.

Iwao became fascinated by pi when she learned about it in math class at school. At university, one of her professors, Daisuke Takahashi, was the record holder for the most-calculated digits of pi using a supercomputer. Now, y-cruncher is the software of choice for pi enthusiasts. Created in 2009, y-cruncher is designed to compute mathematical constants like pi to trillions of digits. "You need a pretty big computer to break the world record," says Iwao. "But you can't just do this with a computer from a hardware store, so people have previously built custom machines." In September of 2018, Iwao started to consider how the process of calculating even more digits of pi would work technically. Something which came up quickly was the amount of data that would be necessary to carry out the calculations, and store them -- 170 terabytes of data, which wouldn't be easily hosted by a piece of hardware. Rather than building a whole new machine Iwao used Google Cloud.

Iwao used 25 virtual machines to carry out those calculations. "But instead of clicking that virtual machine button 25 times, I automated it," she explains. "You can do it in a couple of minutes, but if you needed that many computers, it could take days just to get the next ones set up." Iwao ran y-cruncher on those 25 virtual machines, continuously, for 121 days.

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

Google Smashes the World Record For Calculating Digits of Pi

Comments Filter:
  • ... can I download it from?

    • want to impress your girlfriend? :)
    • Re:Where... (Score:5, Funny)

      by hcs_$reboot ( 1536101 ) on Thursday March 14, 2019 @09:25AM (#58272212)
      You can get even more precision: 10 (in pi base)
    • Re:Where... (Score:5, Funny)

      by Jason Levine ( 196982 ) on Thursday March 14, 2019 @09:30AM (#58272242) Homepage

      Back in college, I jokingly sent my friend 1 million digits of PI. This was on a VAX terminal college e-mail system and he didn't know how to delete the message without scrolling through the entire thing. So he sat there hitting page down over and over until he reached the bottom. For some reason, he didn't seem to appreciate the practical joke.

      • Remind me of the time I drop rock on friend Grog. He not like rock smash him. He beat me with club. Then saber tooth tiger eat whole family. Me laugh last!

      • Well, thank God you didn't have 30 Trillion digits available. He'd still be there.

    • by xonen ( 774419 )

      It's waiting for the copyright lawyers from Hollywood to make a claim.

      After all, the binary data from every move that was ever made and ever will be made is already in the number pi.

      Actually, if you would describe the whole universe in binary format -or decimal if you wish-, it's already in the number pi. Somewhere.

      • by Thud457 ( 234763 )
        Not impressed until they get to the part where the complete text of the Carl Sagan novel "Contact" shows up.
        Or Stanislaw Lem's "His Master's Voice", which probably comes first. /snark
      • Re:Where... (Score:4, Interesting)

        by AmiMoJo ( 196126 ) on Thursday March 14, 2019 @10:55AM (#58272696) Homepage Journal

        Actually, if you would describe the whole universe in binary format -or decimal if you wish-, it's already in the number pi. Somewhere.

        Can't be, because some universal constants are irrational, and therefore cannot be in another number.

        • by Anonymous Coward

          Your mom is pretty irrational and I was inside her last night.

        • by Anonymous Coward

          yes but if you can describe the constant with a generating function that could be encoded as a finite length algorithm and therefore a finite number

        • Can't be, because some universal constants are irrational, and therefore cannot be in another number.

          imagine the following number: 0.131415926...
          which is
          0.1 followed by the digits of pi in base 10.
          this is clearly irrational, (since pi is irrational, it will be neverending), yet it's a irrational number that contains another number in them.
          Why isn't your favourite irrational number like this? Can you prove that pi is not contained within even e?

          • by AmiMoJo ( 196126 )

            For that to work one infinitely long number would have to be longer than another infinitely long number.

    • by AHuxley ( 892839 )
      Whats the file size in terms of Firefox Send?
    • My initial reaction to this story was to wonder how irrelevant this is from a real world perspective. The actual universe is not flat. Made me wonder how many decimal places actually apply to reality. I'm guessing that it's a larger number somewhere out between galaxies... Here on earth, probably less than 10 digits of pi are significant, and fewer than that if you were on Mercury.

      Seems to make more sense to calculate an irrational number that has some rational relationship to the real world. How about e? I

      • with 39 digits of pi you an calculate the size of the universe with an error of less than the width of a hydrogen atom......
  • Sounds like Iwao smashed the record, but she happened to use Google Cloud computers to do it. With just 25 machines, Google staff probably was unaware of her existence.

  • How can we make sure that the digits are even correct? What would prevent an algorithm to generate random numbers after some millions of valid digits?
    • by Anonymous Coward

      There are Spigot algorithms that amount to pi pez dispensers.
      https://en.wikipedia.org/wiki/Spigot_algorithm
      They are ludicrously slow, but you input a digit of position and they will output the digit at that position without calculating all the intermediate values.
      https://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula

    • Re: (Score:3, Interesting)

      by DickBreath ( 207180 )
      If it is an algorithm calculating PI, it would be mathematically provably correct. This formula (there are more than one) calculate PI to arbitrary precision. All that is left to question is the correctness of the implementation.

      Since PI has been independently calculated by so many different implementations over time, the initial digits of them can be cross checked for correctness. One early effort, was it in the 1950s maybe(?) calculated PI to 2000 places, and that was called a 'stunt' to show off a
      • by AmiMoJo ( 196126 )

        For your record calculation to be recognized you need to demonstrate that you made some effort to determine if it was correct or not, which usually means using two different algorithms and comparing the results. So actually she calculated Pi to 31.4 trillion digits twice, the second time with different code for verification of the first calculation.

    • by Livius ( 318358 )

      It's from Google so I imagine it's as reliable as Google's search engine.

  • by Black Parrot ( 19622 ) on Thursday March 14, 2019 @09:40AM (#58272284)

    So if her last digit was wrong, how far off would she be on a calculation of the diameter of the observable universe?

    Does pi have any meaning when you get details beyond the Planck length?

    • by kalpol ( 714519 ) on Thursday March 14, 2019 @09:51AM (#58272336)
      I've read somewhere you only need 40 digits to calculate the diameter of a circle the size of the observable universe to a precision within the diameter of a hydrogen atom.
      • by kalpol ( 714519 )
        edit: i may mean accuracy, not precision.
      • by ImprovOmega ( 744717 ) on Thursday March 14, 2019 @10:30AM (#58272528)
        Regarding your edit, you do mean precision. And the measure I prefer is computing the volume in cubes with Planck-length edges of a sphere with the diameter of the observable universe. But even that only takes you out to 200 or so digits.

        Here's some data [davidpratten.com] on the size of the observable universe in Planck-lengths. 200 digits of pi should be sufficient to precisely compute the number of Planck-length cubed units in our observable universe. From a strictly physical perspective, more than this level of precision in meaningless.
    • by Opyros ( 1153335 )
      Sure it does. Pi comes into a huge number of formulas in both pure mathematics and applications; circle measurements just happen to be the first to be discovered.
  • by Anonymous Coward

    So the same piece of software, y-cruncher, was used to break the record 6 times.
    This latest record has 31,415,926,535,897 digits. Har har, get it?

    • Cute. The next person to beat that record needs to calculate ten times as many digits to get one more digit in the number of digits.
  • Pi just got bigger.

    You missed a real opportunity there to say:

    There's now a lot more PI to go around.

    It's even more delicious than you think at first glance... "around", get it?!?

    • When you make pi bigger everybody gets a bigger piece. I'll take mine in apple, if you please. How much more of a byte am I now entitled to?

  • by Anonymous Coward

    Google did nothing other than sell the environment. Maybe the headline should say Intel because it may have built the actual hardware, or Cisco because its switches were used somewhere?

    • Emma Haruka Iwao works for Google, so there is that connection as well. But I agree, it wasn't a Google initiative or anything so the headline should properly credit the effort.
  • by grep -v '.*' * ( 780312 ) on Thursday March 14, 2019 @09:58AM (#58272366)

    "But instead of clicking that virtual machine button 25 times, I automated it,"

    She needs 170 terabytes of space across 25 computers for 121 days to produce 31.4 (Ha!) trillion digits. And she's worried about clicking a button a few times?? Hell, even I'm not that anal unless it was a trivial solution. (for a in `seq 1 25` ; do ./push ; done)

    First world problems, I guess.

    So in all seriousness, how do you check that? Run it again and see if it produces the same number? If there's a timing bug, it'll differ. If there's (say) a BAD timing bug, it won't; but might differ on a different machine. Or numeric coprocessor problems: One [slashdot.org] Two [wikipedia.org] Three [wordpress.com]. Or cosmic rays actually flipping a bit somewhere. (ECC CPUs?) I realize this is all fun and games, but how do you know that it's actually correct? See if you can use it to successfully square the circle, in which case it's not?

    • by AmiMoJo ( 196126 )

      For verification the tool in question has two methods of calculating digits of Pi, and compares the results.

      For automating 25 clicks, I would assume it was more than a single click but even so, what geek hasn't wasted more time automating something that it would have taken to do manually? Manual repetitive tasks are boring, automation is an interesting little task.

    • (for a in `seq 1 25` ; do ./push ; done)

      You just saved yourself 25 keystrokes...in a mere 38 keystrokes.

  • Public-key/private-key encryption systems are based on factoring primes and the premise is no one can identify all the primes in a truly huge list of whole numbers starting at zero.

    So now that we know what Google can do in corporate spare time with its processors, maybe someone out there with more knowledge that I have can answer the question "Can two-factor encryption be undermined by the computing power Google used today to generate a Pi Day (March 14th) news release?"

    • by epine ( 68316 )

      Public-key/private-key encryption systems are based on factoring primes and the premise is no one can identify all the primes in a truly huge list of whole numbers starting at zero.

      Everything about that statement is wrong.

      We don't factor primes, we factor prime products. Furthermore, it's relatively easy to identify primes, or we couldn't come up with the two large primes to multiply together in the first place.

      We can also test that the product isn't prime with good efficiency.

      What we can't do is efficientl

  • by turp182 ( 1020263 ) on Thursday March 14, 2019 @10:37AM (#58272574) Journal

    In terms of electricity.

    Or how much would it have cost someone who doesn't work at Google.

    25 servers, 121 days, 170 terabytes of data.

    And then the real question, was it really WORTH it?

    • by Anonymous Coward

      And then the real question, was it really WORTH it?

      It placed a puff piece about Google Cloud in Wired, so their marketing department would say "Yes".

    • I found the Google estimate site and used the highest RAM servers available. 25 servers at 24/7 comes to over $277,000 if paid by a customer. Estimate variables below.

      That's over $1.1 million USD for the 4 month period.

      I'd call this exercise a massive waste of electricity. How much coal was used in this exercise? How many tons of CO2 did this add to the environment?

      Site:
      https://cloud.google.com/produ... [google.com]

      Estimate Details:
      25 x Calculating Pi.
      18,250 total hours per month
      VM class: regular
      Instance type: n1-ul

      • by dj245 ( 732906 )

        I found the Google estimate site and used the highest RAM servers available. 25 servers at 24/7 comes to over $277,000 if paid by a customer. Estimate variables below.

        That's over $1.1 million USD for the 4 month period.

        I'd call this exercise a massive waste of electricity. How much coal was used in this exercise? How many tons of CO2 did this add to the environment?

        Site: https://cloud.google.com/produ... [google.com]

        Estimate Details: 25 x Calculating Pi. 18,250 total hours per month VM class: regular Instance type: n1-ultramem-160 (160 CPUs, 3844GB RAM) Region: Iowa Total available local SSD space 8x375 GB (3,000GB per server) Commitment term: 1 Year Estimated Component Cost: USD 277,868.11 per 1 month

        That's far beyond what the record page [numberworld.org] shows. It appears the record was broken with a single dual-socket Xeon machine. Which is in line with how the previous record (a single 4-socket Xeon machine using older processors) was broken.

        • I figured she had access to the highest level cloud servers they offer, with her working there. Reading the article is says that every digit takes additional time, memory, and storage.

          She works for Google in their "high performance computing and programming language communities" per the summary (I did read the article as well).

    • by garcia ( 6573 )

      If you care about having a 'world record' and/or are obsessed with Pi, like this person happens to be, I suppose it is.

      What I'm surprised by is the limit of only 25 VMs. In a previous job, we would spin up 64 VM clusters hundreds of times a day to chunk through 100TB of data in a few seconds and shut them down immediately after the data were processed.

      While I realize you cannot always make a baby in 1 month with 9 women, I still wonder if this could not have been done more economically both financially and

    • by dj245 ( 732906 )

      In terms of electricity.

      Or how much would it have cost someone who doesn't work at Google.

      25 servers, 121 days, 170 terabytes of data.

      And then the real question, was it really WORTH it?

      25 virtual machines (they say). The record page [numberworld.org] shows that the hardware was a single dual-socket Xeon machine [numberworld.org]. That screengrab doesn't show anything about virtual machines, and it is unclear to me that you would need such an arrangement since the software is fully multi-threaded.

      It isn't really anything earthshattering, Peter Trueb used a 4-socket Xeon system with E7-8890 v3's to get the previous record. Emma took 16 more days (15% more) than Peter to do the calculation, and I assume the processors wer

  • I don't think I can handle any more pie.

  • Comment removed based on user account deletion
  • by DrSpock11 ( 993950 ) on Thursday March 14, 2019 @11:10AM (#58272768)

    Seems irrational to me.

  • Way too much work. Just pass a law that sets pi to be 3. https://en.wikipedia.org/wiki/... [wikipedia.org]

  • Should've reported it as 3.14 x 10^13 digits.
  • I saw a documentary where the aliens were sending messages to civilizations by encoding message from the 1 trillionth digit of pi.
  • Hey boss. I want to harness a couple hundred VMs to find the most profitable stock market buy-sell strategy based on all the different types of moving averages and periods. I figure six moths to a year to write the code, then another 6 mo at least to let it chunk along. I'll share the results with you before I publish.
  • Now let's do exp(1).
  • How much better is the world now? How many people are better off? How many animals are saved? No "pi" for them, eh?
  • Now the Shepherd's Pi song can be extended from one million hours (derived from one billion Pi digits) to 30 billion hours, or 3.5 million years!

    Elevator music for geological ages!

  • 25 virtual machines spent 121 days not analysing protein folding or cures for cancer.

  • I'd like to know the first pi x 10 trillion digits!

Children begin by loving their parents. After a time they judge them. Rarely, if ever, do they forgive them. - Oscar Wilde

Working...