function [d,e]=IQR(d,e)
n=length(d);
oldc=1;
c=1;
for k=1:n-1
    [c,s,r]=ROT(c*d(k),e(k));
    if k~=1
        e(k-1)=r*olds;
    end
    [oldc,olds,d(k)]=ROT(oldc*r,d(k+1)*s);
end
h=c*d(n);
e(n-1)=h*olds;
d(n)=h*oldc;
end