# Generate PI in slow motion

Here is a brute force method for approximating PI. It's running via timeouts at 1,000 ops per second. Meaning, much much slower than YOUR computer can go. Try clicking 10 million to see what I mean. You just jumped 2 hours ahead at that old speed. It is done using random numbers fed into the expression: 0 <= x && x <= 1 && 0 <= y && y <= 1 && (x * x) + (y * y) < 1). Fun fact: The Chinese mathematician Zu Chongzhi, around 480 AD, calculated that 3.1415926 < π < 3.1415927 and suggested the approximations π ≈ 355 / 113 = 3.14159292035... and π ≈ 22 / 7 = 3.142857142857..., which he termed the Milü ("close ratio") and Yuelü ("approximate ratio"), respectively, using Liu Hui's algorithm applied to a 12,288-sided polygon!!! With a correct value for its seven first decimal digits, this value of remained the most accurate approximation of π available for the next 800 years!!

## 3.

* not recommended, will freeze your machine. try resizing the window for fun though during the lockdown.

### 0.

#### slow computer

0.

Wolfram Alpha value of the constant PI 3.141592653589793238462643383279502884197169...