title: float numbers in c [Xcode IDE]
body: <p>I have started to learn c language but the problem is that I'm confused about how to use float numbers. I am using Xcode as IDE. Here are the results that got me confused:  </p>
  
  <pre><code>float x1 = 1.123456789123456789f;  
  double x2 = 1.123456789123456789f;  
  float x3 = 987654321.123456789f;  
  double x4 = 987654321.123456789f;  
  
  printf("x1 = %.20f\n", x1);  
  printf("x2 = %.20f\n", x2);  
  printf("x3 = %10.10f\n", x3);  
  printf("x4 = %10.10f\n", x4);  
  </code></pre>
  
  <p>The output is:  </p>
  
  <pre>
  x1 = 1.12345683574676513672  
  x2 = 1.12345683574676513672  
  x3 = 987654336.0000000000  
  x4 = 987654336.0000000000  
  </pre>
  
  <p>The question is, why <code>x1</code>, <code>x2</code> lose their float digits after <code>1.12345678</code>? And why <code>x3</code> and <code>x4</code> are truncated? </p>