An Ode to Pi

An Ode to Pi

March 14th marks a celebration of the famous irrational number pi (π).

As shown below, on his blog, Fredrik Johansson, a junior researcher at Canari, made a post that showed 100 different ways to code up the number pi. Ranging from 180° radians to finding a root of sin(x) that's closest to three (findroot(sin, 3)), these are various methods to calculate pi.

Also below is a YouTube link to the Pi song listing up to 100 digits of pi with additional lyrics. Additionally, people typically enjoy a slice of pie, as they are both homophones.

The

100 mpmath one-liners for pi