Irish logarithm

Irish logarithms were a system of number manipulation invented by Percy Ludgate for machine multiplication. The system used a combination of mechanical cams as look-up tables and mechanical addition to sum pseudo-logarithmic indices to produce partial products, which were then added to produce results.[1] The technique is similar to Zech logarithms (also known as Jacobi logarithms), but uses a system of indices original to Ludgate.[2]

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.[3] Because both lookup tables are one-dimensional, and the addition of indices is simple to implement mechanically, this allows a less complex mechanism than would be needed to implement a two-dimensional 10x10 multiplication lookup table.

Pseudocode

The following is an implementation of Ludgate's Irish logarithms algorithm in Python:

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(i, j):
    return table2[table1[i] + table1[j]]

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 that the last third of the second table is entirely zeros; this can potentially be exploited to further simplify a mechanical implementation.

gollark: I have entirely too much free time and some Python knowledge.
gollark: Anyway, the subsidies take basically none of your money, so I guess you could just have one account build up massive debts without huge problems.
gollark: Or just post cliched responses to random comments in popular subreddits...
gollark: I had to get AutoMeme5000 to 50 karma manually back in the day.
gollark: There's a karma requirement IIRC.

References

  1. Randall, Brian (October 1982). "From Analytical Engine to Electronic Digital Computer:The Contributions of Ludgate, Torres, and Bush" (PDF). Annals of the History of Computing. 4 (4): 20.
  2. de Man, Andries. "Irish Logarithms Part 2 – Calculating History". sites.google.com. Retrieved 2019-12-28.
  3. de Man, Andries. "Irish Log Animation". Archived from the original on 2020-02-23. Retrieved 2019-12-29.

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.


This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.