The Bailey-Borwein-Plaff formula that allows you to extract any specific hexadecimal or binary digit of pi without calculating the previous ones (the current record was set on the Chudnovsky algorithm, see under the cat)Compute Cluster Google Compute Engine for 121 days on 25 virtual machines calculated the largest number of digits in pi, setting a new world record: 31.4 trillion decimal places. This is the first time that public cloud software has been used to calculate pi values ​​of this magnitude.
')
The record will be recorded in the name of Emma Haruka Iwao (Emma Haruka Iwao) from the division of high performance computing at Google. It was she who used the Google Cloud infrastructure for computing. The previous world record was set by Peter Trubom in 2016, he calculated the number to 22.4 trillion digits
on a specially made server , which the employer also sponsored.
Like Trub, the Google engineer used the y-cruncher to calculate. This program uses
the Chudnovsky algorithm , a fast algorithm for calculating the number pi. Back in the 1980s, the
Chudnovsky brothers themselves calculated a billion decimal places with it.
In turn, the algorithm is based on the property of the rapid convergence of the hypergeometric series:

Emma Haruka Ivao was fascinated by the "magic" number, having learned about it in a school lesson in mathematics,
writes Wired . At the university, one of its professors, Daisuke Takahashi (Daisuke Takahashi), was a record holder in the number of calculated digits of a number using a supercomputer. Today, almost any interested engineer who has access to serious computing resources and large disk storage (for storing the result of calculations) can put a record. Created in 2009, the
y-cruncher program is designed to calculate mathematical constants, such as pi. It supports massive multithreading and trillionth ranges. This program actually commoditized constant computations.
“You need a fairly large computer to beat the world record,” said Iwao. “It’s not possible to do this on a computer from a store, so people used to build custom cars.” In September 2018, Ivao began to consider how the computation process will technically work in a range outside the record range. It immediately became clear that the main problem will be the amount of data for storage. The result was that the calculated result is 170 terabytes. Instead of building a custom server, like its predecessors, the girl used the Google Cloud infrastructure.

Ivao picked up 25 virtual machines: “But instead of pushing this button of the virtual machine 25 times, I automated it,” she explains. “You can do it in a couple of minutes, but if you need so many computers, it will take several days to set everything up.” Then, continuously for 121 days, Ivao managed the work of the y-cruncher on these 25 virtual machines.
For correct calculations, virtual machines had to work all the time. The engineer installed a monitoring system that would warn her if something went wrong, for example, about a sudden crash on one of the virtual machines. Just one accident - even for a couple of minutes - could have jeopardized the entire calculation process, if not for the backup.
“There are backup systems in Krancher and Google Cloud, and I set them up so that you can instantly make copies of these discs without stopping the calculations,” says Ivao. This data was then copied and stored externally, on other disks, as snapshots.
“In the beginning there were several parameters that I changed, for example, how much data you could read or write at a time, and how the boundaries will change as you increase,” says Iwao.
With the increase in the number of digits, the volume of files became larger, and the complexity of calculations increased nonlinearly. This greatly complicated the initial calculation, when Ivao tried to calculate what resources of virtual machines she needed for the project.
Both the calculations and the verification of the result are now completed: two basic algorithms are built into the y-cruncher — one for calculating pi itself and the other for checking. The verification algorithm works in parallel with the calculation, but calculates only one digit, so that the record can be registered officially.
Theoretically, a new world record can be set if you simply take the previous file and apply the Bailey-Borwein-Plaff formula to calculate one more number. But this is certainly contrary to the rules for registering such world records: most likely, each applicant must begin the calculation all over again. As an option: to improve the previous achievement by N%, which according to the formula of Bailey-Borwein-Plaff will not work.