function [q1,e1]=ProgressiveQDStepShifted(n,q,e,s)
% PROGERSSIVEQDSTEPSHIFTED progressive qd-step with shift
%   [q1,e1]=ProgressiveQDStepShifted(n,q,e,s) computes a progressive
%   qd-step with shift s for the given qd-line q, e. The new qd-line
%   is q1, e1.

e(n)=0;                  
q(1)=q(1)+e(1)-s;
for k=2:n,
  e(k-1)=(e(k-1)/q(k-1))*q(k);
  q(k)=(q(k)-e(k-1))+e(k) -s;
end
q1=q(1:n); e1=e(1:n); 