The C header files that are included with your OS, compiler, or C runtime library are not really intended for human consumption. You can certainly read them, and you can learn quite a bit by trying to understand them, but they're primarily intended for use by the compiler. As you've seen in these examples, they tend to depend on a lot of compiler-specific features (a habit you should try to avoid in your own code).
They also tend to have a lot of #ifdef
s, so the same headers can be used with different systems.
If you just want to know how to use the sin
function, for example, you're better off reading your system's documentation. On my Ubuntu system, for example, man sin
shows this (among other things):
SYNOPSIS
#include <math.h>
double sin(double x);
float sinf(float x);
long double sinl(long double x);
Link with -lm.
The _CRTIMP
and __cdecl
are probably important to the compiler, but as a programmer you can safely ignore them.
If you're looking for the source code that implements the sin
function, that may or may not be available. It might be written in a language other than C; there have even been systems where it's implemented in hardware (though a small wrapper would still be required).
Another answer provides a link to one implementation, but that's probably not the one used on your system.
And you don't need to get too bogged down in how the sin
function is implemented. It's certainly a good thing to know, but you don't need that information to write code that uses it. (I absolutely do not want to discourage curiosity.)