function stability
max=40;
x=(sqrt(5)-1)/2.;
x1=1;
x2=x;
chyba=zeros(max);
for i=2:40
  pom=x2;
  x2=x1-x2;
  x1=pom;
  printf("%d\n%20.15f\n%20.15f\n\n",i,x2,x^i);
  chyba(i)=(x2-x^i)/x^i;
endfor
plot(chyba(20:max))


endfunction
