MATLAB: Does this showing inf

MATLAB

Hi guys,
I appreciate it if some one can tell me what's the problem with my code that shows inf?
n=linspace(1,10^9,10);
y=exp(1);
e=(1+(1\n)).^n;
error=abs(y)-abs(e)/abs(y)

Best Answer

Look at the value of 1\n .
Are you certain that you intended to use Matrix Left Divide rather than ./ ?
Related Question