% File: A_10b.M for Appendix A, Section 10

clear;

x = input('Enter the desired value of x: ');
y = q(x);
ya = qa(x);
fprintf('\n\nQ(x) = %e\n',y);
fprintf('\n\nQA(x) = %e\n',ya);
fprintf('\n\nThe difference is = %e\n',abs(ya-y));

