Return values differ depending on vector size
<p>I noticed that for example the <code>log(x)</code> function returns slightly different values when called with vectors of different sizes in MATLAB.</p>

<p>Here is a minimal working example:</p>

<pre><code>x1 = 0.1:0.1:1;
x2 = 0.1:0.1:1.1;

y1 = log(x1);
y2 = log(x2);

d = y1 - y2(1:length(x1));

d(7)
</code></pre>

<p>Executing returns:</p>

<pre><code>&gt;&gt; ans = 
  -1.6653e-16
</code></pre>

<p>The behaviour seems to start when the vector becomes greater than 10 entries.</p>

<p>Although the difference is very small, when being scaled by a lot of operations using large vectors, the errors became big enough to notice.</p>

<p>Does anyone have an idea what is happening here?</p>