Post Reply 
Ln(x) using repeated square root extraction
03-06-2022, 09:33 AM
Post: #12
RE: Ln(x) using repeated square root extraction
I was curious to try Pauli's idea and use:

\(\log\left(\frac{1+\varepsilon}{1-\varepsilon}\right) = 2 \left( \varepsilon + \frac{\varepsilon^3}{3} + \frac{\varepsilon^5}{5} + \mathcal{O}(\varepsilon^7) \right) \)

We set:

\(\frac{1+\varepsilon}{1 - \varepsilon} = x\)


This leads to:

\(\varepsilon = \frac{x - 1}{x + 1}\)


Here's the corresponding program for the HP-15C:
Code:
   001 {          11 } √x̅
   002 {          11 } √x̅
   003 {          11 } √x̅
   004 {          11 } √x̅
   005 {          11 } √x̅
   006 {          11 } √x̅
   007 {          36 } ENTER
   008 {          36 } ENTER
   009 {           1 } 1
   010 {          30 } −
   011 {          34 } x↔y
   012 {           1 } 1
   013 {          40 } +
   014 {          10 } ÷
   015 {          36 } ENTER
   016 {          36 } ENTER
   017 {          36 } ENTER
   018 {           5 } 5
   019 {          10 } ÷
   020 {          20 } ×
   021 {           3 } 3
   022 {          15 } 1/x
   023 {          40 } +
   024 {          20 } ×
   025 {          20 } ×
   026 {           1 } 1
   027 {          40 } +
   028 {          20 } ×
   029 {           1 } 1
   030 {           2 } 2
   031 {           8 } 8
   032 {          20 } ×

The computation of \(\varepsilon\) is now a bit more complicated, but we have fewer terms to compute.
In the end, the program is shorter.

The result for \(x = 2\) is:

0.6931471773


Compared to the previous result, it is only slightly off in the last digit.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Ln(x) using repeated square root extraction - Thomas Klemm - 03-06-2022 09:33 AM



User(s) browsing this thread: 1 Guest(s)