Here I use log to mean logarithm base 10.
Here is a quick, iterative method to compute $\log x$ for any
$1 \le x \le 10.$
[INITIALIZE] Let $n = 0$. Define
$$\begin{array}{ccc}
xl_0 = 1& xm_0=\sqrt{10} & xr_0=10 \\
yl_0 = 0& ym_0=0.5 & yr_0=1
\end{array}$$
[ITERATE] Compare $xm_n$ to $x$. If they satisfy your favorite criterion for "close enough", then $\log x = ym_n$ and we are done. Otherwise compute the following and then assign $n\to n+1$.
If $xm_n < x$,
$$\begin{array}{ccc}
xl_{n+1} = xl_n& xm_{n+1}=\sqrt{xl_n \cdot xm_n} & xr_{n+1}=xm_n \\
yl_{n+1}=yl_n& ym_{n+1}=(yl_n+ym_n)/2 & yr_{n+1}=ym_n
\end{array}$$
If $xm_n > x$,
$$\begin{array}{ccc}
xl_{n+1} = xm_n& xm_{n+1}=\sqrt{xm_n \cdot xr_n} & xr_{n+1}=xr_n \\
yl_{n+1}=ym_n& ym_{n+1}=(ym_n+yr_n)/2 & yr_{n+1}=yr_n
\end{array}$$
This is an extremely simple program to write and it returns reasonably accurate values of $\log x $ for $1 \le x < 10$. If you need $\ln x$, just use
$\ln x = \dfrac{\log x}{\log e}$
You might also find THIS interesting. Just scroll down to "An Algorithm For Logarithms".