1.2. Mathematical Functions

CUDA mathematical functions are always available in device code. Some functions are also available in host code as indicated.

Note that floating-point functions are overloaded for different argument types. For example, the log() function has the following prototypes:

‎ double log(double x);
       float log(float x);
       float logf(float x);