Iterative calculation of \log x Suppose one is given an initial

Adela Brown

Adela Brown

Answered question

2022-01-20

Iterative calculation of logx
Suppose one is given an initial approximation of logx,y0, so that:
y0=logx+ϵlogx
Here, all that is known about x is that x>1. Is there a general method of improving that estimation using only addition & multiplication, i.e. without exponentiation or logarithms?
y1=f(y0,x)=?

Answer & Explanation

Joseph Lewis

Joseph Lewis

Beginner2022-01-20Added 43 answers

Instead of solving yln(x)=0 for y you can solve g(y)=eyx=0
Given initial approximation y0ln(x) you can try to solve y using Newtons
jgardner33v4

jgardner33v4

Beginner2022-01-21Added 35 answers

Consider the fact that the number you are working with is a floating point number, then the log of it is
log(b)=log(2exp1.S), where exp is the exponent and S is the significand.
log(b)=explog(2)+log(1.S)
Since 1.S is between 1 and 2, assume it to be 2 then
log(b)(exp+1)log(2).
a couple iterations should give the correct value then.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?