title: matlab precision determinant problem
body: <p>I have the following program  </p>
  
  <pre><code>format compact; format short g; clear; clc;  
  L = 140; J = 77; Jm = 10540; G = 0.8*10^8; d = L/3;  
  for i=1:500000  
  omegan=1.+0.0001*i;
  
  a(1,1) = ((omegan^2)*(Jm/(G*J))*d^2)-2; a(1,2) = 2; a(1,3) = 0; a(1,4) = 0;
  a(2,1) = 1; a(2,2) = ((omegan^2)*(Jm/(G*J))*d^2)-2; a(2,3) = 1; a(2,4) = 0;
  a(3,1) = 0; a(3,2) = 1; a(3,3) = ((omegan^2)*(Jm/(G*J))*d^2)-2; a(3,4) = 1;
  a(4,1) = 0; a(4,2) = 0; a(4,3) = 2; a(4,4) = ((omegan^2)*(Jm/(G*J))*d^2)-2;
  
  if(abs(det(a))&lt;1E-10) sprintf('omegan= %8.3f det= %8.3f',omegan,det(a))
  end          
  end
  </code></pre>
  
  <p>Analytical solution of the above system, and the same <a href="http://paste-it.net/public/xf94d50/" rel="nofollow noreferrer">program written in fortran</a> gives out values of omegan equal to 16.3818 and 32.7636 (fortran values; analytical differ a little, but they're there somewhere).</p>
  
  <p>So, now I'm wondering ... where am I going wrong with this ? Why is matlab not giving the expected results ?</p>
  
  <p><em>(this is probably something terribly simple, but it's giving me headaches)</em></p>