03-21-2016, 12:03 AM

Algorithm:

1. Enter x;

2. Take the square root 6 times;

3. Multiply by 2;

4. Subtract 1;

5. Take the square root;

6. Subtract 1;

7. Multiply by 64.

For x = 2, on an 8-digit calculator like the Canon LC-37, you should get ln(2) ~ 0.693152. For 10-digit calculators, in step 2 take the square root 9 times and multiply by 512 in the last step. Thus, on the HP-12C, which has two guard digits, we get ln(2) ~ 0.693147648. Ordinary 10-digit calculator might give less approximate results.

A 4-step less accurate algorithm is available in this old thread:

http://www.hpmuseum.org/cgi-sys/cgiwrap/...ead=145192

The accuracy range should be tested for your particular calculator. Use these at your own risk.

Gerson.

Method:

\[\ln (x)=\int_{1}^{x}\frac{du}{u}=\int_{1}^{x}u^{-1}du=\lim_{v\rightarrow 0}\left | \frac{u^{v}}{v} \right |_{1}^{x}=\lim_{v\rightarrow 0} \left ( \frac{x^{v}}{v}-\frac{1^{v}}{v} \right )=\lim_{v\rightarrow 0} \left ( \frac{x^{v}-1}{v} \right )\]

By testing the limit with a few values for v close to zero, an empirical second term has been able to be added to the expression:

\[\ln (x)=\lim_{v\rightarrow 0} \left ( \frac{x^{v}-1}{v}-\frac{v\cdot \ln^{2}(x)}{2} \right )\]

After turning the limit into an equality and solving the resulting quadratic equation for ln(x), we get

\[\ln (x)=\lim_{v\rightarrow 0} \left ( \frac{\sqrt{2\cdot x^{v}-1}-1}{v} \right )\]

Example:

Let x = 2 and v = 0.001

Then

\[\ln (2)\approx \frac{\sqrt{2\cdot 2^{0.001}-1}-1}{0.001}\approx 0.69314723\]

which is good to 6 decimal places ( ln(2) = 0.69314718 ).

P.S.: Perhaps 8 square root extractions and final multiplication by 256 (2^8) is a better compromise for the range 2..100 on the Canon LC-37. Contrary to what I thought its SILVA-CELL 189 battery is still working after all these years, so I was able to make some more tests. :-)

1. Enter x;

2. Take the square root 6 times;

3. Multiply by 2;

4. Subtract 1;

5. Take the square root;

6. Subtract 1;

7. Multiply by 64.

For x = 2, on an 8-digit calculator like the Canon LC-37, you should get ln(2) ~ 0.693152. For 10-digit calculators, in step 2 take the square root 9 times and multiply by 512 in the last step. Thus, on the HP-12C, which has two guard digits, we get ln(2) ~ 0.693147648. Ordinary 10-digit calculator might give less approximate results.

A 4-step less accurate algorithm is available in this old thread:

http://www.hpmuseum.org/cgi-sys/cgiwrap/...ead=145192

The accuracy range should be tested for your particular calculator. Use these at your own risk.

Gerson.

Method:

\[\ln (x)=\int_{1}^{x}\frac{du}{u}=\int_{1}^{x}u^{-1}du=\lim_{v\rightarrow 0}\left | \frac{u^{v}}{v} \right |_{1}^{x}=\lim_{v\rightarrow 0} \left ( \frac{x^{v}}{v}-\frac{1^{v}}{v} \right )=\lim_{v\rightarrow 0} \left ( \frac{x^{v}-1}{v} \right )\]

By testing the limit with a few values for v close to zero, an empirical second term has been able to be added to the expression:

\[\ln (x)=\lim_{v\rightarrow 0} \left ( \frac{x^{v}-1}{v}-\frac{v\cdot \ln^{2}(x)}{2} \right )\]

After turning the limit into an equality and solving the resulting quadratic equation for ln(x), we get

\[\ln (x)=\lim_{v\rightarrow 0} \left ( \frac{\sqrt{2\cdot x^{v}-1}-1}{v} \right )\]

Example:

Let x = 2 and v = 0.001

Then

\[\ln (2)\approx \frac{\sqrt{2\cdot 2^{0.001}-1}-1}{0.001}\approx 0.69314723\]

which is good to 6 decimal places ( ln(2) = 0.69314718 ).

P.S.: Perhaps 8 square root extractions and final multiplication by 256 (2^8) is a better compromise for the range 2..100 on the Canon LC-37. Contrary to what I thought its SILVA-CELL 189 battery is still working after all these years, so I was able to make some more tests. :-)