Post Reply 
Ln(x) using repeated square root extraction
03-06-2022, 12:50 AM
Post: #11
RE: Ln(x) using repeated square root extraction
(03-05-2022 08:39 PM)Thomas Klemm Wrote:  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.

It is more work, but we could improve accuracy by "pulling out" 1.

CAS> f(x) := x/(sqrt(1+x)+1) // == sqrt(1+x)-1
CAS> 1. // x-1 = 2-1 = 1
CAS> f(Ans)
0.414213562373
0.189207115003
9.05077326653e−2
4.42737824274e−2
2.18971486541e−2
1.08892860517e−2

The recursive formula, log1p(x) = 2*log1p(x/(sqrt(1+x)+1)), is similar to atan formula
(05-31-2021 09:51 PM)Albert Chan Wrote:  \(\displaystyle\arctan(x) = 2\arctan\left( {x \over \sqrt{1+x^2}+1} \right)\)
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 - Albert Chan - 03-06-2022 12:50 AM



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