__device__ float powf ( float  x,
float  y 
)

Calculate the value of x to the power of y.

Returns:
  • powf($\pm 0$, y) returns $\pm \infty$ for y an integer less than 0.
  • powf($\pm 0$, y) returns $\pm 0$ for y an odd integer greater than 0.
  • powf($\pm 0$, y) returns +0 for y > 0 and not and odd integer.
  • powf(-1, $\pm \infty$) returns 1.
  • powf(+1, y) returns 1 for any y, even a NaN.
  • powf(x, $\pm 0$) returns 1 for any x, even a NaN.
  • powf(x, y) returns a NaN for finite x < 0 and finite non-integer y.
  • powf(x, $-\infty$) returns $+\infty$ for $| x | < 1$.
  • powf(x, $-\infty$) returns +0 for $| x | > 1$.
  • powf(x, $+\infty$) returns +0 for $| x | < 1$.
  • powf(x, $+\infty$) returns $+\infty$ for $| x | > 1$.
  • powf($-\infty$, y) returns -0 for y an odd integer less than 0.
  • powf($-\infty$, y) returns +0 for y < 0 and not an odd integer.
  • powf($-\infty$, y) returns $-\infty$ for y an odd integer greater than 0.
  • powf($-\infty$, y) returns $+\infty$ for y > 0 and not an odd integer.
  • powf($+\infty$, y) returns +0 for y < 0.
  • powf($+\infty$, y) returns $+\infty$ for y > 0.
Note:
For accuracy information for this function see the CUDA C Programming Guide, Appendix C, Table C-1.


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA