 <p>You could try this code to obtain the machine epsilon for <code>float</code> values:</p> <pre><code>#include&lt;iostream&gt; #include&lt;limits&gt; int main(){ std::cout &lt;&lt; "machine epsilon (float): " &lt;&lt; std::numeric_limits&lt;float&gt;::epsilon() &lt;&lt; std::endl; } </code></pre>