Ln(x) using repeated square root extraction
03-06-2022, 12:50 AM
Post: #11
 Albert Chan Senior Member Posts: 1,985 Joined: Jul 2018
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)$$
 « 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)