% What is the purpose of this program? % Which one of f1, f2 is more correct? why? % Most of the newer matlab contains vpa. % If yours doesn't, try google 'matlab vpa' a = 3.e-8; h = a/16; x = -a:h:a; f1 = exp(x) - cos(x) - x; f2 = x.^2 + x.^3/6; figure(1), plot(x,f1,'x',x,f2,'o') x_longer = vpa(x,24); f_longer = exp(x_longer)-cos(x_longer) - x_longer; f0 = double(f_longer); figure(2), plot(x,f0,x,f1,'x',x,f2,'o')