What is the namespace for math functions? Global or std
?
Consider cos function. It has 3 overloads. But there is also legacy cos
from math.
If you are using C++ you can rely on the function overloading.
There are three version of cos:
double cos ( double x );
float cos ( float x );
long double cos ( long double x );
But if you are using only C or you want portabilty only the double version of this function exists with this name. The float function is cosf.