title: sprintf formatting of double value
body: <p>I have one specific problem while converting <code>double</code> values to string using <code>sprintf()</code> in UNIX.</p>
  
  <p>For example I have two values:</p>
  
  <pre><code>double a = 0.009984354523452;
  double b = 0.01;
  </code></pre>
  
  <p>While converting, I am using:</p>
  
  <pre><code>sprintf(somestringvar, "Double value : %.15f \n", a);
  sprintf(diffstringvar, "Double value : %.15f \n", b);
  </code></pre>
  
  <p>to convert to a string. </p>
  
  <p>My problem is for the 'a', the value is printing properly but for the value of 'b', 0's are appended at the tail end. Please provide me any common way to represent 'a' and 'b' as exact values.</p>