How to set 3 digits after comma
<p>Well, basically I was using setprecision(3), but that is rounding up the last number, for example if we do like this - </p>

<pre><code>double x = 5;
x = (double) x / 3;
cout &lt;&lt; fixed &lt;&lt; setprecision(3) &lt;&lt; x &lt;&lt; endl;
</code></pre>

<p>It will show 1.667</p>

<p>But, if we do it with calculator, it will show - 1.666666666...67</p>

<p>So basically, what I mean is, is there any chance to output in file, just the first 3 digits after the comma, and not to round it up?</p>
