title: Storing large decimal numbers in double C++
body: <p>I've made a question yesterday that got taken as a duplicate, I think by mistake. I need to store <code>10e-16</code> in a variable. This alone works, but as soon as I need to subtract it from another <code>double</code> value, the number doesn't change at all. It only starts working if I change the value from <code>10e-16</code> to somothing like <code>10e-4</code>. Any lower numbers don't seem to work. I've tried using long double, but to no avail. I don't need <code>cout.precision()</code> because I don't need to print the number yet, I need it for a loop.</p>
  
  <pre><code>long double x1 = -400, epsilon = 0.000000000000001;
  long double x2 = -400 + epsilon;
  vector &lt;vector &lt;double&gt; &gt; intervals;
  vector &lt;double&gt; interval;
  
  
  while(x1&lt;=650){
      interval.clear();
      if(f1(x1)&lt;0){
          while(f1(x2) &lt;= 0){
              x2 += epsilon;
          }
          while(f1(x1)&lt;0){
              x1 += epsilon;
          }
          x1 -= epsilon;
          interval.push_back(x1);
          interval.push_back(x2);
          intervals.push_back(interval);
          x1=x2;
          x2=x1 + epsilon;
      }
  </code></pre>
  
  <p>This is what the loop looks like. The function <code>f1</code> returns the value of a nonlinear equation. I've tried using GMP, but I've got problems with installing it, which I addressed in a different question. Is there any way to make this work without using GMP?</p>