Ln(x) using repeated square root extraction
|
03-05-2022, 08:39 PM
Post: #9
|
|||
|
|||
RE: Ln(x) using repeated square root extraction
We experience cancellation when calculating \(\varepsilon = \sqrt[n]{x} - 1\).
The program was executed on free42 with 34 decimal digits of precision. Thus this effect is not noticed. It is a trade-off between coming close to \(1\) and how many terms to use in the Taylor series. For a calculator like the HP-15C with 10 digits using \(n = 2^6\) might be the best choice. For \(x = 2\) we end up with the following sequence of iterated square roots: 2.000000000 1.414213562 1.189207115 1.090507733 1.044273783 1.021897149 1.010889286 This leaves us with \(\varepsilon = 0.010889286\) and thus 5 terms of the Taylor series should be enough. We notice the cancellation since we have now only 8 significant digits left. Here's the program for the HP-15C or similar calculators: Code: 001 { 11 } √x̅ For \(x = 2\) we get: 0.6931471776 While for \(\ln(2)\) we get: 0.6931471806 This leaves us with a difference of: 0.0000000030 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)