Google is celebrating Pi Day with a record caclulation of pi to 31.4 trillion digits - the most ever achieved, breaking the previous record of 22.5 trillion digits.
Pi is everywhere you look -- it’s the ratio of the circumference of a circle to its diameter, so the next time you check your watch or see the turning wheels of a vehicle go by, you’re looking at pi. And since pi is an irrational number, there’s no end to how many of its digits can be calculated. You might know it as 3.14, but math and science pros are constantly working to calculate more and more digits of pi, so they can test supercomputers.
Googler Emma Haruka Iwao has been busy using Google Compute Engine, powered by Google Cloud, to calculate the most accurate value of pi—ever. That’s 31,415,926,535,897 digits, to be exact. Emma used the power of the cloud for the task, making this the first time the cloud has been used for a pi calculation of this magnitude.
To calculate pi, Emma used an application called y-cruncher on 25 Google Cloud virtual machines. “The biggest challenge with pi is that it requires a lot of storage and memory to calculate,” Emma says. Her calculation required 170 terabytes of data to complete—that's roughly equivalent to the amount of data in the entire Library of Congress print collections.
Emma’s calculation took the virtual machines about 121 days to complete. During that whole time, the Google Cloud infrastructure kept the servers going. If there’d been any failures or interruptions, it would’ve disrupted the calculation. When Emma checked to see if her end result was correct, she felt relieved when the number checked out. “I started to realize it was an exciting accomplishment for my team,” she says.
Google Cloud has published the computed digits entirely as disk snapshots, so they’re available to anyone who wants to access them. This means anyone can copy the snapshots, work on the results and use the computation resources in less than an hour.
At Google, Emma is a Cloud Developer Advocate, focused on high-performance computing and programming language communities. Her job is to work directly with developers, helping them to do more with the cloud and share information about how products work.