Svein
Science Advisor
- 2,316
- 813
I quoted Fröberg since it was on the required list for my Numerical Algorithms exam back in 1964. After I referred to it, I started to get very unsure of the validity of the algorithm - and, sure enough, it converges badly for a starting value of 1 if a is greater than 1. I have checked and found that the best way is to modify the start value according to this algorithm;
Then use the Fröberg algorithm with the resulting x0.
Code:
Start with x0=2
if a>1
repeat
x0=x0/2
t=(3-x0*x0*a)
until (t<2) and (t>0)
Last edited: