title: finding cube root in C++?
body: <p>Strange things happen when i try to find the cube root of a number.</p>
  
  <p>The following code returns me undefined. In cmd : -1.#IND</p>
  
  <pre><code>cout&lt;&lt;pow(( double )(20.0*(-3.2) + 30.0),( double )1/3)
  </code></pre>
  
  <p>While this one works perfectly fine. In cmd :  4.93242414866094</p>
  
  <pre><code>cout&lt;&lt;pow(( double )(20.0*4.5 + 30.0),( double )1/3)
  </code></pre>
  
  <p>From mathematical way it must work since we can have the cube root from a negative number.
  Pow is from Visual C++ 2010 math.h library. Any ideas?</p>