title: C - Summation with Double - Precision
body: <p>I have problem with precision of <strong>double format</strong>.</p>
  
  <hr>
  
  <p><em>Sample example:</em></p>
  
  <pre><code>double K=0, L=0, M=0;
  scanf("%lf %lf %lf", &amp;K, &amp;L, &amp;M);
  if((K+L) &lt;= M) printf("Incorrect input");
  else printf("Right, K=%f, L=%f, M=%f", K, L, M);
  </code></pre>
  
  <hr>
  
  <p><em>My test input:</em></p>
  
  <p>K = 0.1, L = 0.2, M = 0.3 -> Condition but goes to <strong>'else'</strong> statement.</p>
  
  <hr>
  
  <p>How I can correct this difference? Is there any other method to summation?</p>