title: Why are `ccos`, `csqrt`, `cpow` not recognised?
body: <p>Why am I getting these errors? (I have a <code>clang/g++</code> compiler.)</p>
  
  <pre><code>error: use of undeclared identifier 'ccos'
  error: use of undeclared identifier 'csqrt'; did you mean 'sqrt'?
  error: use of undeclared identifier 'cpow'; did you mean 'pow'?
  </code></pre>
  
  <p>and so forth. I have declared my function as:</p>
  
  <pre><code>#include &lt;complex&gt;
  
  double ghmc1AccNormalised( double ph, double r, double t, double th){
  
      complex&lt;double&gt; numerator;
      complex&lt;double&gt; denominator;
      double E = exp(1);
  
  
      numerator=-(cpow(E,t*((-2*r + r*ccos(th) + r* // ... etc
          // what follows is 24MB of a horrible polynomial from Mathematica
          ...
      denominator = cpow(2,0.3333333333333333) //... etc
  
  return creal(numerator/denominator);
  }
  </code></pre>
  
  <p>I am trying to ensure that I am handling the imaginary variables correctly.
  I have spent a long time looking at various posts but I have the following issues:</p>
  
  <ul>
  <li>The values are coming out as <code>inf</code> and <code>nan</code> when they shouldn't</li>
  <li>I suspected that this was due to complex numbers not being handled properly</li>
  <li><a href="https://stackoverflow.com/a/9860772/4013571">This highly rated post</a> notes that <code>ccos</code>, <code>csqrt</code> etc. should be used for complex arguments</li>
  <li>I have tried various namespaces in addition to the above: 
  
  <ul>
  <li><code>using complex;</code></li>
  <li><code>using std::complex;</code></li>
  <li>I tried also prepending <code>std::complex</code> and <code>complex::</code> to each function</li>
  </ul></li>
  </ul>
  
  <p><em>Disclaimer</em> This is my first <code>c/c++</code> function so please ignore trivial issues unless directly related to the question</p>