`sin`

, `sinf`

, `cos`

, `cosf`

---sine or cosine#include <math.h> double sin(doublex); float sinf(floatx); double cos(doublex); float cosf(floatx);

**Description**

`sin`

and `cos`

compute (respectively) the sine and cosine
of the argument `x`. Angles are specified in radians.

`sinf`

and `cosf`

are identical, save that they take and
return `float`

values.

**Returns**

The sine or cosine of `x` is returned.

**Portability**

`sin`

and `cos`

are ANSI C.
`sinf`

and `cosf`

are extensions.

Go to the first, previous, next, last section, table of contents.