Is there a difference between exp() & expf() functions in CUDA? Can both of them be used for double precision? Or is it that expf() is exclusively for float type single precision? Appendix C in the programming guide seems to be a little ambiguous about it.
CUDA’s nomenclature follows established precedent in C/C++. The ‘f’-suffix to the function’s base name indicates that expf() is a function that takes a float argument and returns a float result, i.e. the prototype is: float expf(float);
Note that the entire source code of the CUDA math library interface and implementation is available for inspection by CUDA users. You can find the code in the header files math_functions.h and math_functions_dbl_ptx3.h.