Calculating more than 31 trillion digits of pi took months for Emma Haruka Iwao and her team, who beat the previous record for the most accurate value of pi by trillions of digits.