title: Negative singular value using LAPACK svd
body: <p>I have a 399 x 399 matrix for which the R svd() function (using LAPACK) gives me a negative singular value! This is not supposed to happen -- has anyone seen this before? It does not happen if I use the LINPACK option, so I guess this is a bug in the LAPACK svd.</p>
  
  <pre><code>ganymede: R --vanilla
  
  R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
  Copyright (C) 2012 The R Foundation for Statistical Computing
  ISBN 3-900051-07-0
  Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
  
  R is free software, etc ...
  
  &gt; load('A.dat')
  &gt; ls()
  [1] "A"
  &gt; dim(A)
  [1] 399 399
  &gt; 
  &gt; L1 &lt;- svd(A)
  &gt; any( L1$d &lt; 0 )
  [1] TRUE
  &gt; L1$d[1:4]
  [1] 80.18833 68.93905 61.62659 57.62883
  &gt; L1$d[396:399]
  [1]  3.777844e-15  3.582460e-15  3.175665e-15 -6.512578e+00
  &gt; 
  &gt; L2 &lt;- svd(A,LINPACK=TRUE)
  &gt; any( L2$d &lt; 0 )
  [1] FALSE
  &gt; L2$d[1:4]
  [1] 80.18833 68.93905 61.62659 57.62883
  &gt; L2$d[396:399]
  [1] 8.565532e-32 3.254162e-32 3.484425e-47 5.411232e-48
  &gt; 
  </code></pre>