title: precision loss while converting from python float to C++ double
body: <p>I am embedding python code in my c++ program. 
  The use of PyFloat_AsDouble is causing loss of precision. It keeps only up to 6 precision digits. My program is very sensitive to precision. Is there a known fix for this?
  Here is the relevant C++ code:</p>
  
  <pre><code>_ret = PyObject_CallObject(pFunc, pArgs);
  vector&lt;double&gt; retVals;
  for(size_t i=0; i&lt;PyList_Size(_ret); i++){
      retVals[i] = PyFloat_AsDouble(PyList_GetItem(_ret, i));
  }
  </code></pre>
  
  <p>retVals[i] has precision of only 6, while the value returned by the python code is a float that can have a higher precision.
  How to get full precision?</p>