x = [1:1:1000];

y_actual   = log(factorial(x));
y_stirling = x.*log(x)-x;

%plot(x,y_actual);
%hold on;
%plot(x,y_stirling,'r');
%hold off;

error = y_actual - y_stirling;
plot(x,error);
