Up To 10% of CD-Rs Fail Within a Few Years
Há 21 minutos





Aproximação Quociente Média
1 2/1 (2+1)/2=1.5
1.5 2/1.5=1.3333 (1.3333+1.5)/2=1.4167
1.4167 2/1.4167=1.4118 (1.4167+1.4118)/2=1.4142
1.4142 ...
function y=heron(x,y,tol)
while(abs(x-y.^2)>tol)
y=heron(x,(y+x/y)/2,tol);
endwhile;
endfunction;
> heron(2,1,.001)
> heron(2,1,.001)
> heron(2,heron(2,3/2,.001),.001)
> heron(2,heron(2,heron(2,17/12,.001),.001),.001)
577/408





clear all;
x=linspace(0,2,100);
clf;
hold on;
grid;
yc=cos(pi*x);
ys=sin(pi*x);
for j=0:25:100
z=pi*x;
for i=1:j;
z=z.*(1-1/i^2*x.^2);
endfor;
plot(x,z)
endfor;
for j=0:25:100
y=ones(1,100);
for i=0:j;
y=y.*(1-4/(2*i+1)^2*x.^2);
endfor;
plot(x,y,'m')
endfor;
plot(x,yc,'r-;cos(x);')
plot(x,ys,'g-;sin(x);')
axis([0 2 -1.5 1.5])


This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.