title: Multiply doubles in Python with same precision as C++
body: <p>I am rewriting a C++ program into Python. I need to multiply 2 doubles but C++ and Python don't give the same result. Here's an example with 'hard-coded' values:</p>
  
  <p><strong>C++</strong></p>
  
  <pre><code>printf("%f", ( 44474025505478620106407223274000875520.0 * 5454277033526873088.0 ) );
  &gt;&gt;&gt; 242573655903020442240866171189072992939998568974355791872.0
  </code></pre>
  
  <p><strong>Python</strong></p>
  
  <pre><code>print("%f" % ( 44474025505478620106407223274000875520.0 * 5454277033526873088.0 ) )
  &gt;&gt;&gt; 242573655903020398684723205308949669628048817708024725504.0
  </code></pre>
  
  <p>My problem is that I don't need the most accurate result: I need to get (with Python) a result as close as C++'s result as possible.</p>
  
  <p>In my example, the 15 first digits are the same:</p>
  
  <pre><code>C++ &gt; 242573655903020[442240866171189072992939998568974355791872.0
  Py  &gt; 242573655903020[398684723205308949669628048817708024725504.0
  </code></pre>
  
  <p>I need to have a result even more close (18 first digits would be nice)</p>
  
  <p>I'm really stuck here... Anybody has an idea?</p>
  
  <p><strong>FYI</strong>:</p>
  
  <p>Python version: 2.7.8</p>
  
  <p>C++ compiler: cl.exe (the one from visual studio)</p>