title: What is the meaning of numeric_limits<double>::digits10
body: <p>What is the precise meaning of numeric_limits::digits10?
  Some other related questions in stackoverflow made me think it is the maximum precision of a double, but </p>
  
  <ul>
  <li>The following prototype starts working (sucess is true) when precision is greater that 17 ( == 2+numeric_limits::digits10)</li>
  <li>With STLPort, readDouble==infinity at the end; with microsoft's STL, readDouble == 0.0.</li>
  <li>Has this prototype any kind of meaning :) ?</li>
  </ul>
  
  <p>Here is the prototype:</p>
  
  <pre><code>#include &lt;float.h&gt;
  #include &lt;limits&gt;
  #include &lt;math.h&gt;
  #include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  #include &lt;sstream&gt;
  #include &lt;string&gt;
  int main(int argc, const char* argv[]) {
    std::ostringstream os;
    //int digit10=std::numeric_limits&lt;double&gt;::digits10; // ==15
    //int digit=std::numeric_limits&lt;double&gt;::digits; // ==53
    os &lt;&lt; std::setprecision(17);
    os &lt;&lt; DBL_MAX;
    std::cout &lt;&lt; os.str();
    std::stringbuf sb(os.str());
    std::istream is(&amp;sb);
    double readDouble=0.0;
    is &gt;&gt; readDouble;
    bool success = fabs(DBL_MAX-readDouble)&lt;0.1;
  }
  </code></pre>