Some code for computing the reconstructed tables of Napier's logarithms

sunpeng14 (sunpeng14@baidu.com)

16 July 2023

Introduction

This program napierlog is used for calculating Napier's three tables and his small table (Times Table). It uses the library of mpfr, being written in C language. It is somewhat the implementation of procedures in Denis's paper "Napier’s ideal construction of the logarithms". In this program, Nlog() stands for λn() being used in Denis’ paper.

There are mainly four subroutines:

  1. In generateTable1(), the part calculating the first Napier's log(Nlog(9999999.0000000), could be found the corresponded procedure in section 2.4.1 at pp.8 in Denis’ paper.
  2. In ggenerateTable2(), the subroutine of rule39_AdjacentSolver() is called to calculate the first Nlog(9999900) using the adjacent known value Nlog(a[100]) in table 1. This part corresponds to section 2.4.2 at pp.10-12 in Denis’ paper.
  3. The function generateTable3() is the implementation of section 2.4.3 in Denis’ paper.
  4. The function generateTimesTable() is used to generate Napier’s small table. When calculating Nlog(5000000), the procedure is as same as in section 2.5.3 at pp. 18 in Denis’s paper.

Output

The result of generateTable1() , generateTable2() , generateTable3() will be as same as Denis’ table at section 10 if one place are rounded.

Yet in generateTimesTable() , the Nlog(5000000) is 6931471.80561769037722788673, which is a little different from Denis’, which is 6931471.77 at Figure 4(ideal values), but it is as same as the one in Figure 5. Readers can recheck this function in detail.

(text provided by the author, Peng Sun(孙鹏))