cos()

NAME

cos(), cosf() - cosine function

SYNOPSIS

#include <math.h>

double cos (double x) float cos (float x)

DESCRIPTION

The cos(3) and cosf(3) functions compute the cosine of x (measured in radians). A large magnitude argument may yield a result with little or no significance.

The cosf(3) call takes float arguments rather than doubles.

RETURN VALUES

The cos(3) and cosf(3) functions return the cosine value of x.

If the value of x is too large, the return value of cos(3) is indefinite.

ERRORS

The cos(3) and cosf(3) calls can set errno to the following errors:

[EDOM]
The value of x was NaN or Infinity.
[ERANGE]
The result would cause an underflow.

SEE ALSO

asin(3)

acos(3)

atan(3)

atan2(3)

cosh(3)

sin(3)

sinh(3)

tan(3)

tanh(3)