Irish logarithm

{{short description|Method of multiplying small numbers using lookup tables}}

The Irish logarithm was a system of number manipulation invented by Percy Ludgate for machine multiplication. The system used a combination of mechanical cams as lookup tables and mechanical addition to sum pseudo-logarithmic indices to produce partial products, which were then added to produce results.{{Cite journal|last=Randall|first=Brian|date=October 1982|title=From Analytical Engine to Electronic Digital Computer:The Contributions of Ludgate, Torres, and Bush|url=https://www.scss.tcd.ie/SCSSTreasuresCatalog/hardware/TCD-SCSS-T.20121208.124-preMiscellany/Randell-Contributions-of-Ludgate-Torres-and-Bush-IEEEComputer-398.pdf|journal=Annals of the History of Computing|volume=4|issue=4|pages=20|access-date=2019-12-28|archive-date=2019-12-28|archive-url=https://web.archive.org/web/20191228213734/https://www.scss.tcd.ie/SCSSTreasuresCatalog/hardware/TCD-SCSS-T.20121208.124-preMiscellany/Randell-Contributions-of-Ludgate-Torres-and-Bush-IEEEComputer-398.pdf|url-status=live}}

The technique is similar to Zech logarithms (also known as Jacobi logarithms), but uses a system of indices original to Ludgate.{{Cite web|url=https://sites.google.com/site/calculatinghistory/home/irish-logarithms-1/irish-logarithms-part-2-1|title=Irish Logarithms Part 2 – Calculating History|last=de Man|first=Andries|website=sites.google.com|access-date=2019-12-28|archive-date=2020-02-23|archive-url=https://web.archive.org/web/20200223123833/https://sites.google.com/site/calculatinghistory/home/irish-logarithms-1/irish-logarithms-part-2-1|url-status=live}}

Concept

Ludgate's algorithm compresses the multiplication of two single decimal numbers into two table lookups (to convert the digits into indices), the addition of the two indices to create a new index which is input to a second lookup table that generates the output product.{{cite web|url=http://ajmdeman.awardspace.info/t/irishlog.html|title=Irish Log Animation|last=de Man|first=Andries|url-status=live|archive-url=https://web.archive.org/web/20200223122727/http://ajmdeman.awardspace.info/t/irishlog.html|archive-date=2020-02-23|access-date=2019-12-29}} Because both lookup tables are one-dimensional, and the addition of linear movements is simple to implement mechanically, this allows a less complex mechanism than would be needed to implement a two-dimensional 10×10 multiplication lookup table.

Ludgate stated that he deliberately chose the values in his tables to be as small as he could make them; given this, Ludgate's tables can be simply constructed from first principles, either via pen-and-paper methods, or a systematic search using only a few tens of lines of program code.{{Cite web |last=Coghlan |first=Brian |date=2020-06-10 |title=Percy Ludgate's Logarithmic Indexes |url=https://treasures.scss.tcd.ie/miscellany/TCD-SCSS-X.20121208.002/Ludgate-LogarithmixIndexes-20200610-1459.pdf |access-date=2023-10-01 |website=treasures.scss.tcd.ie}} They do not correspond to either Zech logarithms, Remak indexes or Korn indexes.

Pseudocode

The following is an implementation of Ludgate's Irish logarithm algorithm in the Python programming language:

table1 = [50, 0, 1, 7, 2, 23, 8, 33, 3, 14]

table2 = [ 1, 2, 4, 8, 16, 32, 64, 3, 6, 12,

24, 48, 0, 0, 9, 18, 36, 72, 0, 0,

0, 27, 54, 5, 10, 20, 40, 0, 81, 0,

15, 30, 0, 7, 14, 28, 56, 45, 0, 0,

21, 42, 0, 0, 0, 0, 25, 63, 0, 0,

0, 0, 0, 0, 0, 0, 35, 0, 0, 0,

0, 0, 0, 0, 0, 0, 49, 0, 0, 0,

0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

0]

def product(a: int, b: int) -> int:

"""Ludgate's Irish logarithm algorithm."""

return table2[table1[a] + table1[b]]

Table 1 is taken from Ludgate's original paper; given the first table, the contents of Table 2 can be trivially derived from Table 1 and the definition of the algorithm. Note since that the last third of the second table is entirely zeros, this could be exploited to further simplify a mechanical implementation of the algorithm.

See also

  • {{annotated link|Faber-Castell Model 366}}
  • {{annotated link|Canon arithmeticus}}

References

{{refs}}

Further reading

  • Boys, C.V., "A New Analytical Engine," Nature, Vol. 81, No. 2070, July 1, 1904, pp. 14–15.
  • Randell, B., "Ludgate's analytical machine of 1909", The Computer Journal, Volume 14, Issue 3, 1971, Pages 317–326, https://doi.org/10.1093/comjnl/14.3.317 Includes the text of Ludgate's original paper.