find an approximation of sqrt(2) via picard's iterations

Open question

2022-01-10

Since 21+11+1+11+1+11+2 I thought i could do rn+1sn+1=1+11+1+11+1+11+rnsn with the following piece of code :

ite = 8
int r = 1;
int s = 1;
int R = 0;
for (int i=0,i<ite,1){
    R = 3*r+4*s;
    s=2*r+3*s;
    r=R
}
int result = r/s;
System.out.println(result);

But it's not exactly the code one would get using picard's iteration method, so my answer does not fit the criteria. What am-I doing wrong?

 

If one does not know the answer but knows how to visualise picard's method for calculating sqrt(2) on a graph that would already help me a lot.

 

Thanks in advance

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Linear algebra

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?