I have come to know that NVCC silently allows calling std:: host math functions in device code:
Apparently it silently removes the std:: prefix and executes the resulting function.
This is very confusing and most importantly is wrong, as it will use double-precision functions, which might be much slower than expected. std::sin() in C++ has proper overloads for float and double so it uses the correct datatype.
Would it be possible to remove this magic from NVCC and make it complain about calling std:: math functions in device code?