How can I improve the precision of a double in c++? : <p>I would like to improve the precision of a double. It seems the precision of double and float is the same. 
(I also need a better precision for my future c++ plans.)</p>

<p>I have no clue how to do this.</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

int main()
{
    double fraction1 = 0.123467890123456789;
    float fraction2 = 0.123467890123456789;
    cout &lt;&lt; fraction1 &lt;&lt; endl;
    cout &lt;&lt; fraction2 &lt;&lt; endl;
    return 0;
}
</code></pre>

<p>This yields:</p>

<p>0.123468 <br>
0.123468</p>

<p>I would have expected something like a precision of 10 or more digits.</p>
