Ln(x) using repeated square root extraction
03-06-2022, 09:33 AM
Post: #12
 Thomas Klemm Senior Member Posts: 1,771 Joined: Dec 2013
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$$

$$\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.
 « Next Oldest | Next Newest »

 Messages In This Thread Ln(x) using repeated square root extraction - Gerson W. Barbosa - 03-21-2016, 12:03 AM RE: Ln(x) using repeated square root extraction - Gerson W. Barbosa - 03-21-2016, 05:09 AM RE: Ln(x) using repeated square root extraction - Paul Dale - 03-21-2016, 07:11 AM RE: Ln(x) using repeated square root extraction - Thomas Klemm - 03-03-2022, 11:20 PM RE: Ln(x) using repeated square root extraction - Albert Chan - 03-06-2022, 12:04 AM RE: Ln(x) using repeated square root extraction - Dan C - 03-05-2022, 05:32 PM RE: Ln(x) using repeated square root extraction - Dan C - 03-05-2022, 05:53 PM RE: Ln(x) using repeated square root extraction - Dan C - 03-05-2022, 08:02 PM RE: Ln(x) using repeated square root extraction - Namir - 03-05-2022, 08:29 PM RE: Ln(x) using repeated square root extraction - Thomas Klemm - 03-05-2022, 08:39 PM RE: Ln(x) using repeated square root extraction - Albert Chan - 03-06-2022, 12:50 AM RE: Ln(x) using repeated square root extraction - Thomas Klemm - 03-06-2022 09:33 AM RE: Ln(x) using repeated square root extraction - Albert Chan - 03-09-2022, 07:47 PM RE: Ln(x) using repeated square root extraction - Thomas Klemm - 03-10-2022, 05:18 AM RE: Ln(x) using repeated square root extraction - Albert Chan - 03-10-2022, 03:17 PM

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