title: How can I change the displayed value of a double when outputting to the console in Eclipse Kepler, C++, (mac OS X)?
body: <p>Here is my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;ctype.h&gt;
  
  using namespace std;
  
  class Project3
  {
  public:
      long double divbythree()
      {
          while (i&lt;halfprime){
              primefactor = prime/i;
              ++i;
              if (primefactor == (long long int)primefactor){
              //if (modf(primeoverthree, 0) == 0){
                  cout &lt;&lt; "Prime factor is: " &lt;&lt; primefactor &lt;&lt; endl;
                  cout &lt;&lt; "Denominator is: " &lt;&lt; i &lt;&lt; endl;
              }
              else{/*empty else statement*/   }
          }
          cout &lt;&lt; primefactor &lt;&lt; endl;
          return prime;
      }
  private:
      long double primefactor = 1;
      long double prime = 600851475143;
      long double halfprime = 300425737570;
      long double i = 1;
  };
  
  
  int main() {
      Project3 Pro3;
      Pro3.divbythree();
  
      return 0;
  }
  </code></pre>
  
  <p>...and here is my output:</p>
  
  <pre><code>Prime factor is: 6.00851e+11
  Denominator is: 2
  Prime factor is: 8.4627e+09
  Denominator is: 72
  Prime factor is: 7.16152e+08
  Denominator is: 840
  </code></pre>
  
  <p>Etc.</p>
  
  <p>Is there any way to change the IDE settings so that the console shows all elements of the double?</p>
  
  <p>Or maybe so that output displays to some decimal place, i.e. to 5 decimal places.</p>
  
  <p>Any help would be appreciated, thank you.</p>
  
  <p>Edit: Answer here: <a href="https://stackoverflow.com/questions/4217510/how-to-cout-the-correct-number-of-decimal-places-of-a-double-value">How to &#39;cout&#39; the correct number of decimal places of a double value?</a></p>