\Header{Trig}{Trigonometric Functions}
\alias{cos}{Trig}
\alias{sin}{Trig}
\alias{tan}{Trig}
\alias{acos}{Trig}
\alias{asin}{Trig}
\alias{atan}{Trig}
\alias{atan2}{Trig}
\keyword{math}{Trig}
\begin{Usage}
\begin{verbatim}
cos(x)
sin(x)
tan(x)
acos(x)
asin(x)
atan(x)
atan2(y, x)
\end{verbatim}
\end{Usage}
\begin{Description}
These functions give the obvious trigonometric functions.  They
respectively compute the cosine, sine, tangent, arc-cosine, arc-sine,
arc-tangent, and the two-argument arc-tangent.\end{Description}
\begin{Note}
All angles are in radians.\end{Note}
\begin{SeeAlso}
\texttt{\Link{Log}}, \texttt{\Link{Math}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
cos(0) == 1
sin(3*pi/2) == cos(pi)
x <- rnorm(99)
all( sin(-x) == - sin(x))
all( cos(-x) == cos(x))

x <- 1:99/100
all(Mod(1 - (cos(x) + 1i*sin(x)) / exp(1i*x)) < 1.1 * .Machine$double.eps)
 2* abs(1 - x / acos(cos(x))) / .Machine$double.eps #-- depends ?
all(abs(1 - x / asin(sin(x))) <= .Machine$double.eps) # TRUE
all(abs(1 - x / atan(tan(x))) <= .Machine$double.eps) # TRUE
\end{ExampleCode}
\end{Examples}

