% Evaluate e with a precision of 10^(-3).
n = 6;
s = 1;
for k = 1:n
    s = s + 1/factorial(k);
end
s