title: C compiler bug (floating point arithmetic)?
body: <pre><code>#include&lt;stdio.h&gt;
  
  int main()
  {
      double fract=0;
      int tmp;
  
      //scanf("%lf",&amp;fract);
      fract=0.312;
      printf("%lf",fract);
      printf("\n\n");
      while(fract&gt;0){
          fract*=(double)10;
          printf("%d ",(int)fract);
          fract-=(int)fract;
      }
      getch();
      return 0;
  }
  </code></pre>
  
  <p>this code shoud have an output of:
  312</p>
  
  <p>but somehing isn't going right.. i'm using devcpp 4.9.9.2 compiler...</p>