title: C: convert double to float, preserving decimal point precision
body: <p>i wanted to convert double to float in C, but wanted to preserve the decimal point exactly as possible without any changes...</p>
  
  <p>for example, let's say i have</p>
  
  <pre><code>   double d = 0.1108;
     double dd = 639728.170000;
     double ddd = 345.2345678
  </code></pre>
  
  <p>now correct me if i am wrong, i know that floating point precision is about 5 numbers after the dot. can i get those five numbers after the dot exactly as the double had it? so that above results as follows:</p>
  
  <pre><code>   float f = x(d);
     float ff = x(dd);
     float fff = x(ddd);
  
     printf("%f\n%f\n%f\n", f, ff, fff);
  </code></pre>
  
  <p>it should print</p>
  
  <pre><code>   0.1108
     639728.17000
     345.23456
  </code></pre>
  
  <p>all digits after the precision limit (which i assume as 5) would be truncated.</p>