title: How to take the cube root of a negative number in VBA for Excel?
body: <p>I am trying to compute the cube root of a negative number in VBA for Excel.  Taking the cube root of a negative number in an Excel worksheet works fine:</p>
  
  <pre><code>=(-2)^(1/3)
  -1.25992
  </code></pre>
  
  <p>However the same concept coded into VBA:</p>
  
  <pre><code>(-2)^(1/3)
  </code></pre>
  
  <p>gives a <code>#VALUE!</code>error when returning the value to the worksheet.  I suspect VBA is parsing the <code>1/3</code> to its decimal representation <code>0.3333...</code> and therefore causing a mathematical error since negative numbers can't be raised to non-integer powers in the real domain.  Is there a workaround?</p>