TinyPI

Introduction

TinyPI is a small C program computing millions of digits of Pi using the Chudnovsky formula. The challenge was to have a running time nearly proportional to the number of computed digits while keeping the program as simple as possible. The memory usage is proportional to the number of computed digits.

TinyPI has no dependency on external libraries. The x86_64 Linux version weights 14 kB.

Download

Source code: tinypi-2024-11-04.tar.gz.

TinyPI is also available in JSLinux.

Related projects

Other small open source programs to compute large number of digits of PI: Larger and faster programs to compute PI:

Licensing

It is released under the MIT license.
Fabrice Bellard - https://bellard.org/