How can we compute cube-root in python with specified precision?
<p>How can we compute cube-root in python with specified precision? </p>

<p>I would like to use the decimal class for this and my compiler is python 2.5</p>

<p>I tried using something like this:</p>

<pre><code>  &gt;&gt;&gt; from decimal import *
  &gt;&gt;&gt; x=Decimal("10")
  &gt;&gt;&gt; print x**(Decimal("1.0")/3)

 Traceback (most recent call last):
   File "&lt;pyshell#4&gt;", line 1, in &lt;module&gt;
      print x**(Decimal("1.0")/3)
   File "C:\Python25\lib\decimal.py", line 1752, in __pow__
      return context._raise_error(InvalidOperation, 'x ** (non-integer)')
   File "C:\Python25\lib\decimal.py", line 2325, in _raise_error
      raise error, explanation
   InvalidOperation: x ** (non-integer)
 &gt;&gt;&gt; 
</code></pre>

<p>That's working on pyth 2.6 and onwards but not in pyth 2.5? Any solution for that?</p>
