Pi Calculator v2

A high-precision π calculator using the Chudnovsky algorithm with JavaScript Web Workers

About This Calculator

This page is a new version of my previous Pi calculator. It demonstrates advanced JavaScript capabilities by computing the mathematical constant π (pi) to arbitrary precision using the Chudnovsky algorithm, one of the fastest known algorithms for calculating pi. The calculation runs in a Web Worker to keep the UI responsive during computation. This is a new version of the original Pi calculator, rewritten for improved performance and responsiveness.

The Chudnovsky Formula:

1/π = (12/C³) × Σ [(-1)ᵏ × (6k)! × (13591409 + 545140134k)] / [(3k)! × (k!)³ × Cᶾᵏ]

where C = 640320, and the sum is computed over k from 0 to the number of iterations. Each iteration roughly adds 14 correct digits of pi. The result is then validated against known digits of π, with mismatches highlighted in red.

Loading...
Results