William Echols

Natural Logarithm of 2

Sep 2021

The natural log of 2, sometimes written as $\ln(2)$ or $\log(2)$, is an important constant in fields such as mathematics and computer science. It starts with the digits 0.69314 and continues infinitely.

$\log(2)$ is a transcendental number, which means that it is not the root of any polynomial with rational coefficients. For our purposes, this means that it cannot be perfectly represented using a finite number of digits and its digits do not repeat. As a result, calculating its digits requires a lot of computational power. However, there are several known methods to calculate $\log(2)$ to arbitrary precision.

Putting theory into practice

Using y-cruncher, I calculated 1.5 trillion digits of $\log(2)$ with this server:

Supermicro server

Component Specification
Processor 2x Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz
Topology 48 threads / 24 cores / 2 sockets
Usable Memory 252 GiB
Usable Storage ~200 TiB

In order to easily structure and partition the server, I used Proxmox (a hypervisor: a program that allows you to manage virtual machines) to run an Ubuntu container allocated with the full server’s resources. In order to meet Numberworld’s standards for record submission, I ran the calculation twice:

The first calculation used the Primary Machin-like Formula (3 terms) algorithm provided by y-cruncher.

$$ \log(2)=18\operatorname{ArcCoth}(26)-2\operatorname{ArcCoth}(4801)+8\operatorname{ArcCoth}(8749) $$

The second calculation used the Secondary Machin-like Formula (4 terms) algorithm (also provided by y-cruncher) for verification.

$$ \log(2)=144\operatorname{ArcCoth}(251)+54\operatorname{ArcCoth}(449)−38\operatorname{ArcCoth}(4801)+62\operatorname{ArcCoth}(8749) $$

The results from these calculations matched perfectly, indicating that the computation was successful. Here are some interesting stats from these computations:

Algorithm Read Written Computation Time
Primary 737 TiB 647 TiB 96.4 days
Secondary 823 TiB 728 TiB 53.6 days

Over the course of the calculations, nearly 1.5 PiB (~1.5 million gigabytes) of data was read and written to the hard drives, causing many of the already-used disks to fail. Thankfully, I had expected some drive failures so I had partitioned the disks with RAID (redundancy to prevent data loss) before starting the calculations.

Results

Here are the last digits I computed (numbered 1,499,999,999,901 to 1,500,000,000,000), broken into groups of 10 for clarity:

5455756881 7640150407 6681972149 9106229418 4374409281 1670491330 6214376057 5948324637 0570636787 5000462651

Both full logs are available at the Numberworld website: computation logs and verification logs.

Aftermath

This computation held the record for the most digits of $\log(2)$ ever calculated, starting from September 9, 2021 and lasting until February 12, 2024 (for a total of 886 days), when Jordan Ranous successfully calculated 3 trillion digits of $\log(2)$ in just 90 hours! As of the time of this writing, his record still stands.