function [q1,e1]=DifferentialQDStepShifted(n,q,e,s)
% DIFFERENTIALQDSTEPSHIFTED computes one differential qd-step with shift
%   [q1,e1]=DifferentialQDStepShifted(n,q,e,s) computes one
%   differential qd-step with shift s for the qd-line q, e. The new
%   qd-line is q1, e1.

d=q(1)-s;                       
for k=1:n-1
  q(k)=d+e(k);
  h=q(k+1)/q(k);
  e(k)=e(k)*h;
  d=d*h-s;
end
q(n)=d;
q1=q; e1=e;
