title: Why is my call of the CUDA math library sqrt() function failing?
body: <p>I am new to Cuda, I have the following function:</p>
  
  <pre><code>__global__ void square(float *myArrayGPU)
  {
     myArrayGPU[threadIdx.x] = sqrt(threadIdx.x);
  }
  </code></pre>
  
  <p>I want to use the cuda math library, I tried to <code>#include "math.h"</code> but I still get the error </p>
  
  <p><code>error: calling a __host__ function("__sqrt") from a __global__ function("square") is not allowed</code></p>
  
  <p>Any idea what library should I include to use the <code>sqrt</code>?</p>