printing a float has unexpected value : <p>Why has '32' been added to the value of v in the output below?</p>

<pre><code>int main()
{
    float v = 9.999e8;

    std::cout &lt;&lt; "v --&gt; " &lt;&lt; v &lt;&lt; std::endl;

    std::cout &lt;&lt; std::fixed;
    std::cout &lt;&lt; "v --&gt; " &lt;&lt; v &lt;&lt; std::endl;

    return 0;
}
</code></pre>

<p>output:</p>

<pre><code>v --&gt; 9.999e+08
v --&gt; 999900032.000000
             ^^ 
</code></pre>

<p>Is it an artefact of printing the value, or that 9.999e+08 cannot be accurately represented in a float? </p>

<p>Changing v to a double resolves the issue but I want to understand the actual cause.</p>

<p><strong>strong text</strong></p>
