2

Multiplication by addition using logarithms is possible and took place in past using slide rule and log tables. Is it still used in software? Maybe sometimes it's faster to convert numbers and use addition operations instead of multiplication, then convert numbers back? Is it used somewhere? If yes, where?

  • This is actually one of the fundamental problems of numerical analysis. Some computer implementations will use approximations for certain functions using things like the Chebyshev polynomials, the Legendre Interpolating polynomials, Taylor Polynomials, etc.. Implementations of $how$ a computer program calculates certain functions is a case-by-case basis depending on the processor, whether it uses look-up tables or has a math coprocessor and such. For calculating logarithms, one computer may find it faster to use Taylor polynomials while another may find it faster/only possible by lookup tables – Decaf-Math Jul 24 '15 at 06:34
  • 1
    I don’t think it’s used for most standard purposes, but I could see it being helpful if you’re working with very large numbers that are outside of the range of floats/doubles. – Varun Vejalla Jul 22 '22 at 04:18
  • Something like 10000! You’d probably be happy to calculate the logarithm. – gnasher729 Dec 11 '23 at 19:16
  • Multiplication occurs in the hardware, not the software, and a single floating point multiplication is the unit that computational algorithms are usually trying to minimize ie its so fast that everything else is built off it.

    That said, discrete logarithms are used for some cryptographic calculations and you can still buy a slide rule if you want. But day to day computing doesn't have a use for the real logaritm to the best of my understanding.

    – user24142 Dec 12 '23 at 07:34

1 Answers1

0

It always depends. There is always a tradeoff in time, memory and precision. At a fixed precision you can storing all the answers in memory and just look them up. In the case of log tables you can only get 4 significant figures at most before the energy you spend carrying the tables becomes more than the energy needed to calculate the logarithm yourself. (Your energy consumption may vary.) But modern hardware does not use log tables, not to say software, since we want many more significant figures. However, it is not known what is the optimal algorithm for multiplication or computing the elementary functions, including the exponential and the logarithm.

user21820
  • 57,693
  • 9
  • 98
  • 256