gnu c++ floating number precision
<p>I have simple question about floating number,</p>

<pre><code>double temp;  
std::cout.precision(std::numeric_limits&lt;double&gt;::digits10);
temp = 12345678901234567890.1234567890;
std::cout &lt;&lt; (temp &lt; std::numeric_limits&lt;double&gt;::max()) &lt;&lt; std::endl;
std::cout &lt;&lt; std::fixed &lt;&lt; std::endl;
std::cout &lt;&lt; temp &lt;&lt; std::endl;
</code></pre>

<p>However, the output I get is this,</p>

<pre><code>1
12345678901234567168.000000000000000
</code></pre>

<p>The value of temp is still within the range of double, however, the value is completely different. I am wondering what have I done wrong here?</p>

<p>Thanks.</p>
