# Which Came First, The Algorithm or the Pi?

On March 14, 2019, the BBC and others reported on a breakthrough by a computer scientist named Emma Haruka Iwao: we had more pi than ever. Specifically, on or around that date, Iwao calculated pi to its 31,415,926,535,897th digit (and yes, 31,415,926,535,897 is pi times ten to the 13th power, which isn’t a coincidence). The process took a ton of data and computing power; per the BBC, “the calculation required 170TB of data (for comparison, 200,000 music tracks take up 1TB) and took 25 virtual machines 121 days to complete,” and most importantly, a very specific algorithm. Her feat was a new world record, by a lot — the previous record only (only?) calculated pi to about 22 trillion digits.

That’s a lot more digits than Muhammad ibn Musa al-Khwarizmi figured out — he stopped at five digits, or 3.1416. But his feat is probably more impressive than Iwao’s, for a simple reason; al-Khwarizmi computed his in the year 800, give or take. As mathematicians go, he’s a pretty important one. To the chagrin of students near and far, he wrote a book titled “The Compendious Book on Calculation by Completion and Balancing,” which is among the first algebra books in history. Oh, and he also wrote a book called “On the Calculation with Hindu Numerals,” which is widely credited with spreading the decimal (base-10) numbering system used around the world today.

That’s pretty impressive. In 1983, the Soviet Union honored him with a postage stamp, as seen above, but given all these accomplishments, you’d think al-Khwarizmi would be a household name around the world.

Well, he kind of is.

Muhammad ibn Musa al-Khwarizmi’s name is a reference to where he was from — “al-Khwarizm” means that he was from Khwarazm, a region roughly on the border of modern-day Uzbekistan and Turkmenistan. (Here’s a map.) Over the course of a century or so, al-Khwarizmi’s works spread beyond his immediate home region and into Europe. And around 1690, the decimal system he popularized became known as the “Arabic system of computation,” even though addition, subtraction, and other forms of arithmetic and the like were already widely in place. Al-Khwarizmi’s system — and his name — were transliterated from Arabic into Latin, but something went a bit wrong in the process. “Al-Khwarizmi” was, somehow, recorded as something close to “Algorizmi,” which, in turn, became our all-purpose math word: algorithm.

And that wasn’t the only impact that Al-Khwarizmi’s work had on the language of math. “The Compendious Book on Calculation by Completion and Balancing,” of course, wasn’t titled in English; its Arabic name, transliterated, is “Al-Kitāb al-mukhtaṣar fī ḥisāb al-jabr waʾl-muqābala.” The word “al-jabr” translates to “reunion of broken parts” per Etymology Online, and is a reference to adding a number to both sides of an equation to cancel like terms. That action is fundamental to algebra; it should be no surprise, then, that the word “algebra” comes from the transliteration of “al-jabr.”

So while al-Khwarizmi isn’t the most famous mathematician, he’s certainly not been lost to history. In fact, Iwao had him to thank, literally, for her algorithm.

** Bonus fact**: Muhammad ibn Musa al-Khwarizmi wasn’t born on Pi Day (as far as we know); that’d be too perfect, right? But guess who was? Albert Einstein.

** From the Archives**: Eternal Flame Pit: If you click on the “Here’s a map” link above, you may see something that looks like a weird volcano. It’s not that. It’s this.