How to print upto 100th decimal places accurately of a float or double type variable?
<p>Suppose there are two numbers 22 and 7. I want to print up to the 100th decimal place of the answer which should look like 3.1428571428571428571428571.... whereas trying to use </p>

<pre><code>cout &lt;&lt; setprecision(100) &lt;&lt; fixed &lt;&lt; (22.0/7.0); 
</code></pre>

<p>I get something like 3.142857142857142793701541449991054832935333251953125.......</p>