title: Convert very large number stored as string into number
body: <p>I'm trying to store a value with a large number of decimals in a float variable, but I get this error.</p>
  
  <blockquote>
    <p>print long('37.7745985956747') Traceback (most recent call last):<br>
    File "&lt;stdin>", line 1, in &lt;module> ValueError: invalid literal for
    long() with base 10: '37.7745985956747'</p>
  </blockquote>
  
  <p>I have reviewed all of the other suggested questions here, but none seem to solve my problem and they all mention an additional non-numerical character being present in the string.</p>
  
  <p>I've reviewed both <code>Decimal</code> and <code>Float</code> and it seems that <code>float</code> will truncate the number and <code>Decimal</code> throws an error:</p>
  
  <pre><code>&gt;&gt;&gt; a = '-122.425891675136'
  &gt;&gt;&gt; print float(a)
  -122.425891675
  &gt;&gt;&gt; from decimal import *
  &gt;&gt;&gt; print decimal(a)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  NameError: name 'decimal' is not defined
  </code></pre>
  
  <p>Any suggestions would be very much appreciated!</p>