cos
cosine function
You're viewing an older version of this page (#3239). View the current version.
NAME
cos
INTERFACE
#include <math.h>
double cos ( double x ) long cosl ( long double x ) float cosf ( float x )
#include <complex.h> double complex ccos(double complex z) long double complex ccosl(long double complex z) float complex ccosf(float complex z)
DESCRIPTION
The cos function computes the cosine of x (measured in radians). It returns a value in the range of -1 to 1:
SPECIAL VALUES
cos ( 0 ) returns 1. cos ( ∞ ) returns a NaN and raises the invalid floating-point exception.
SEE ALSO
sin , tan , asin , acos , atan , atan2 , sinh , cosh , tanh
STANDARDS
The cos function conforms to ISO/IEC 9899:1999(E).