0

I've seen many questions on Quora and other websites and it seems impossible to calculate logarithms, is this the case?

Is it possible to calculate the log of any number with any given base? Or is literally all logarithm just picking and trying all numbers and creating tables? Like when I use a website that has a log calculator, does it actually do a calculation, or does it get an estimate that isn't really a calculation/just look up a table?

  • 1
    Depends what you mean by calculate. There are a variety of approximations and series expansions that allow you to get arbitrarily close to the exact value - computers are very good at efficiently evaluating these things – FShrike Sep 13 '21 at 18:32
  • Thanks for the answer @FShrike, so then the answer is no, it is impossible to actually calculate it? I understand you can get close to the answer and all that, but doing a calculation for the exact answer given any base and number is not doable?

    Sorry, didn't mean to just post that one sentence and sound smug, I accidentally hit enter

    – Rolf Haugaland Sep 13 '21 at 18:33
  • 5
    What do you mean by "calculate it"? Usually people consider it sufficient to be able to compute many, many digits of it on demand. What more could you want? Do you believe that we can calculate $\pi$?, $e$?, $\sqrt 2,$? – lulu Sep 13 '21 at 18:55
  • 1
    Caculators clearly can't store a table of all the logarithms that they can calculate. See https://math.stackexchange.com/questions/14066/calculator-algorithms for some relevant links. – Rob Arthan Sep 13 '21 at 19:42
  • @lulu I just thought it was kinda dumb that you cannot calculate logs, I mean you can get to the correct answer and all that, but there isn't a set formula for calculating it. I understand that that is just how our universe works and I just wanted to know if that was the case. You cannot have a simple formula that just solves any log with any arbitrary base. That's all, I also know it isn't dumb, I just wanted to know if it was possible to actually calculate them – Rolf Haugaland Sep 13 '21 at 19:43
  • Also see https://en.wikipedia.org/wiki/Natural_logarithm#High_precision – PM 2Ring Sep 13 '21 at 19:43
  • Yes, there's a simple formula for calculating logs (linked by FShrike), but it's not very efficient compared to slightly more complicated formulae. Generally, these formulae require $x$ to be in a particular range, eg the Mercator series for $\ln(1+x)$ only converges for $|x|<1$, but that's not a problem because it's easy to get $x$ into the desired range. A computer normally stores a floating-point number in the form $m×2^n$, with $0.5\le m<1$. And $\ln(m×2^n)=\ln(m)+n\ln2$. – PM 2Ring Sep 13 '21 at 20:01
  • Different bases aren't a problem, because you can change bases by doing a simple division. $\log_b(x)=\ln(x)/\ln(b)$ – PM 2Ring Sep 13 '21 at 20:01
  • calculators are the modern version of a table. Tables do not have exact values (except for rare singular cases like $\log_a1=0$ for any base $a$). Google could also be used as a calculator. I do not understand why you seem to imply that a calculation and an estimate are mutually exclusive things. The result of a calculation could be an estimate, for either using an approximate formula only,or for rounding digits in computers (or both). For example, you could use an initial part of the Taylor series for $\ln(1+x)$ like $x-\frac{x^2}2+\frac{x^3}3$ as an approximate formula to estimate $\ln(1+x)$ – Mirko Sep 13 '21 at 20:21

0 Answers0