Modal Title
Cloud Services / Science / Tech Life

How Google’s Emma Haruka Iwao Helped Set a New Record for Pi

What is it like to be the first person to calculate the 100-trillionth decimal place of pi.
Jun 11th, 2022 6:00am by
Featued image for: How Google’s Emma Haruka Iwao Helped Set a New Record for Pi

In the corner of the living room in her Seattle apartment — not too far from her piano — Emma Haruka Iwao was about to catch a glimpse of history. For nearly 158 days a calculation had been running which could set a new world record.

Using the industry-standard pi-calculating software y-cruncher, and then attaching it to the latest in modern cloud infrastructure, Iwao and a team of three other cloud developer advocates at Google — Ben Bleything, Sara Ford and Steve McGhee‎ — were attempting to calculate pi to its 100,000,000,000,000th decimal place.

It would be the most digits of pi ever calculated in human history…

Tuesday Iwao shared all the details of that experience — what it felt like, what she’d learned along the way, and her hopes for the next generation of technology workers.

When that big moment came, what exactly did you see?

It’s an output of y-cruncher. It’s on a remote machine in the data center, so you need to ssh and connect and log into the remote machine… It has how many seconds it took, and how many digits it’s calculating and so on. And at the end, it displayed the last hundred digits of pi.

Screenshot from Emma Haruka Iwao of the day y-cruncher calculated pi to 100 trillion digits in 2022 (cropped

And the last digit was… zero! Back in 2019, when you’d set an earlier record, calculating pi out to 31,415,926,535,897 digits, its last digit was also… zero. Were you surprised to end up with the same last digit for a second time?

A little bit surprised. I know it’s just a coincidence. It’s mathematically just proven that it’s just a coincidence. So I’m surprised — I think it’s special — but mathematically, it’s just one of the numbers.

You wrote a blog post explaining the technical details of creating a cluster to store the massive final result. And it looks like you had to specify how many digits to calculate before you’d even started?

This is specific to y-cruncher. There are different ways, but y-cruncher asks you to enter how many digits you are going to calculate, and y-cruncher then determines the internal precision and how much storage it needs. It actually tells you how much disk you need and how much memory you want to use for a specific combination.

So then why did you pick 100 trillion? How exactly do you decide when the calculating should stop?

Because 100 trillion is an easy number to remember and say… Last time we did 31,415,926,535,897. That was exactly the first 13 digits of pi because I thought it was cool. And this time I picked 100 trillion — because I thought it was cool.

So what does it feel like to be a world record-holder?

Screenshot from interview with Google Cloud advocate Emma Haruka Iwao June 7 2022

A screenshot from our interview with Google Cloud advocate Emma Haruka Iwao – June 7, 2022

It’s exciting… This is my childhood dream, and making the dream come true twice is really a great honor for me.

At the same time I really want to show that with cloud and faster computers, there are more things you can do. This is one of the examples, but there are other scientific fields and other problems and other challenges we can solve with computers. Being able to show that I’ve done something in real life, and talk about it, from personal experience — is really, I think, a great opportunity.

Have you gotten any interesting reactions from the rest of the cloud-computing community?

Kelsey Hightower and I are going to have a live webinar about this world record next Wednesday… Kelsey is a co-worker. He was very excited last time. He said it’s good to be a world-record holder. It’s good to show the capability of the cloud in everyday terms. Like pi.

So you finished on March 21 — followed by months of verifying the number with the developer of y-cruncher, and then planning the final announcement. During all this time, was it hard to keep this triumph a secret?

Yes, it was.

You had earlier said that you haven’t even been able to tell your mother about the second world record. You kept the secret for nearly three months. How did your mother react back in 2019 when you first broke the record?

Last time my mom was pretty excited about it… (Iwao laughs) She gets overly excited. She starts posting on social media and I don’t like it.

Some of my co-workers, their kids were excited. They told their kids that their co-worker was the world-record holder… And I had opportunities to visit schools in the U.S. and Japan and talk about the records and computer science in general to the students. I visited my own high school — I went to high school in Japan at Yosaka. I think the students had no idea who was coming… I really enjoyed this moment.

As a student, I really wished to have more opportunities to learn what others were doing. For example, what mathematics or science, physics — everything we learned in school — would be used for when you start working in real life. So I’m glad I was able to show examples to students. And also kind of shows how you build a career after you graduate from high school and go to college and then start working.

Google Cloud advocate Emma Haruka Iwao (publicity shot shared by Google)

That career and journey was something I talked about multiple times with students. I’m happy to have that opportunity.

So what are your hopes for these students coming up in the next generation?

I really hope everybody can pursue what they’re passionate about. For me, it was about computers. When I started using computers, when I was 11 years old, that was not very common in Japan… But I really enjoyed and liked learning about computers. If a student finds anything — like computer science, mathematics, literature, anything — interesting, I really hope they pursue that and keep studying. Perhaps they can become a professional engineer or expert in industry, or perhaps they might become a researcher in academia. I think there’s a lot of opportunities. And as long as they can keep going — I think that’s great.

There’s a lot of concern about diversity and inclusion in the technology sector. Hopefully, the visibility you’ve achieved as a world-record holder will help make an impact.

I think there are some gender gaps and certainly challenges for marginalized people… And I heard from multiple people sharing similar backgrounds that they were happy to see someone like them achieving a world record. So I’m glad I was able to show something — that anyone can do what they actually want to do. And also, these achievements gave me opportunities to deliver the message and talk about, for example, diversity, inclusion in tech and in workplaces or in communities. This is also what I want to keep doing, and I’d like to use this as an opportunity to deliver different messages and a new message to people who need it.

My message is sometimes it takes time to realize what you’re actually passionate about, and sometimes it takes time to learn skills and have an opportunity. I wanted to calculate pi to records for 20 years, but I didn’t have access to a supercomputer. I was just a usual, normal student. My parents once told me, like, ‘Why do you want to study CS — you’re a girl….” (Iwao laughs) But I’m glad I decided to study computer science.

And I had no idea when I would have the time to calculate pi. It just happened to me all at the same time. So I happened to work for Google, and my team and my managers supported the idea of calculating pi to trillions, and also we have a program, y-cruncher that anyone can use to calculate Pi. So I happened to have access to all the tools and resources I needed to calculate pi. But at the same time, you still need the passion. Google is a big company, and there are lots of engineers who have access to the same resources. But it was my idea and my passion that made these records possible.

So yes, you might need to wait for opportunities, but keep up your passion.

And also for people like me, sometimes in the marginalized minority group, there are people who want to support you. Not necessarily in the same background, but people from different backgrounds, sometimes people in senior leadership — there are always people who want to support you. And if you can find a good mentor, a good sponsor, I think that’s a key to success. And I’m happy that I was able to meet, not a few but many of these kinds of these people.

I asked the broader team if anybody wanted to join the project and calculate pi once again — and three people said ‘Hey I want to do this!’ We have different specialties — so for example, one of us had a strong background in site reliability engineering, and he proposed improvements to the storage system and did more experiments that I hadn’t come up with. So it’s really a collaborative effort!

It’s a great experience and a learning opportunity for me. Last time it was more like a personal project. Leading a team, and explaining what I have in mind to them, actually helped me make these ideas better. And also, it was a great learning opportunity on how to be a good team leader. It was a valuable lesson for me.

So what did you learn from the experience of leading a team?

One thing I really learned is — obviously I think the core idea was mine, but there are a lot of details that I couldn’t possibly come up with without the help of all the team members. And yes, sometimes it took longer to do something — like meetings and putting everyone on the same page. But by doing that, I think we were able to go farther. That’s the power of working as a team.

For the blogs, some of the visualizations are made by team members, and some of the performance improvements are proposed by another team member, and some of the operational techniques are by the other team members. So collectively I think we did a much better job than what I could’ve done with myself…

You don’t know the whole picture. You are learning from other people. As the lead, you need to show the vision, and you need to show the goal, but how you travel is different from what you had expected. And being patient and embracing the surprises is something I learned to do as a new team lead.

It sounds like it was a good experience.

Yes. Definitely.

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Hightower.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.