%-----------------------------------------------------------------------
  function y = MyExpW(x)
% y = MyExpW(x)
% x is a scalar  and y is Taylor approximation to exp(x)
term = 1; y = 0;
k = 0;
while abs(term) > eps*abs(y)
   k = k+1;
   y = y+term;
   term = x*term/k;
end
