title: Strange behaviour when computing svd on a covariance matrix: different results between Microsoft R and vanilla R
body: <p>I was doing some principal component analysis on my macbook running Microsoft R 3.3.0 when I got some strange results. Double checking with a colleague, I've realised that the output of the SVD function was different from what I may get by using vanilla R. </p>
  
  <p>This is the reproducible result, please load the file (~78 Mb) <a href="https://dl.dropboxusercontent.com/u/1249990/Cx.rda" rel="nofollow">here</a> </p>
  
  <p>With Microsoft R 3.3.0 (x86_64-apple-darwin14.5.0) I get:</p>
  
  <pre><code>&gt;&gt; sv &lt;- svd(Cx)
  &gt;&gt; print(sv$d[1:10])
  
   [1] 122.73664 104.45759  90.52001  87.21890  81.28256  74.33418      73.29427  66.26472  63.51379
  [10]  55.20763
  </code></pre>
  
  <p>Instead on a vanilla R (both with R 3.3 and R 3.3.1 on two different linux machines):</p>
  
  <pre><code>&gt;&gt; sv &lt;- svd(Cx)
  &gt;&gt; print(sv$d[1:10])
  
   [1] 122.73664  34.67177  18.50610  14.04483   8.35690   6.80784   6.14566
   [8]   3.91788   3.76016   2.66381
  </code></pre>
  
  <p>This is not happening with all the data, if I create some random matrix and I apply svd on that, I get the same results. So, it looks like a sort of numerical instability, isn't it? </p>
  
  <p>UPDATE: I've tried to compute the SVD on the same matrix (<code>Cx</code>) on the same machine (macbook) with the same version of R by using the <code>svd</code> package and finally I get the "right" numbers. Then it seems due to the svd implementation used by Microsoft R Open. </p>
  
  <p>UPDATE: The behaviour happens also on MRO 3.3.1 </p>