title: Why does MSVC++ require std::setprecision to enable full precision output with std::hexfloat?
body: <p>As far as I'm aware, the following line is all that is required to output doubles in hex to full precision:</p>
  
  <pre><code>std::cout &lt;&lt; std::hexfloat &lt;&lt; yourDouble &lt;&lt; std::endl;
  </code></pre>
  
  <p>But using MSVC++ in Visual Studio 17 this only prints a double to 6 hex-digits. See my code (truncated for clarity):</p>
  
  <pre><code>std::ifstream cacheF(pToFile, std::ios::in);
  if (!cacheF.is_open()) {
      std::cerr &lt;&lt; "Could not open " &lt;&lt; pToFile &lt;&lt; "!" &lt;&lt; std::endl;
      return 1;
  }
  
  bool readSuccess = true;
  unsigned long long sumBegin, cached[2];
  double previousTime;
  readSuccess = readSuccess &amp;&amp; (cacheF &gt;&gt; std::dec &gt;&gt; sumBegin);
  readSuccess = readSuccess &amp;&amp; (cacheF &gt;&gt; std::hexfloat &gt;&gt; previousTime);
  for (int i = 0; i &lt; 2; i++) readSuccess = readSuccess &amp;&amp; (cacheF &gt;&gt; std::hex &gt;&gt; cached[i]);
  
  cacheF.close();
  
  if (!readSuccess) {
      std::cerr &lt;&lt; "Cache reload failed due to improper file formatting!" &lt;&lt; std::endl;
  }
  
  std::cout &lt;&lt; std::hexfloat &lt;&lt; previousTime &lt;&lt; std::endl;
  std::cout &lt;&lt; std::setprecision(13) &lt;&lt; std::hexfloat &lt;&lt; previousTime &lt;&lt; std::endl;
  </code></pre>
  
  <p>Input file looks like this:</p>
  
  <pre><code>1045644800006
  0x1.567be0370cdc8p+7
  C6CCFEDA2563B0D1
  5E3492440B4BE8B2
  </code></pre>
  
  <p>Output is:</p>
  
  <pre><code>0x1.567be0p+7
  0x1.567be0370cdc8p+7
  </code></pre>
  
  <p>It's been a while since I last tried this with GCC but if I remember correctly it produced full double precision output without needing setprecision. Can anyone confirm if this is an MSVC++ specific behavior, and if it is why?</p>