title: C - finding cube root of a negative number with pow function
body: <p>In real world cube root for a negative number should exist:
  <code>cuberoot(-1)=-1</code>, that means <code>(-1)*(-1)*(-1)=-1</code>
  or
  <code>cuberoot(-27)=-3</code>, that means <code>(-3)*(-3)*(-3)=-27</code></p>
  
  <p>But when I calculate cube root of a negative number in C using <code>pow</code> function, I get <code>nan</code> (not a number)</p>
  
  <pre><code>double cuber;
  cuber=pow((-27.),(1./3.));
  printf("cuber=%f\n",cuber);
  </code></pre>
  
  <p>output: <code>cuber=nan</code></p>
  
  <p>Is there any way to calculate cube root of a negative number in C?</p>