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̅ 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 »
|
User(s) browsing this thread: 1 Guest(s)