\Header{Hyperbolic}{Hyperbolic Functions}
\alias{acosh}{Hyperbolic}
\alias{asinh}{Hyperbolic}
\alias{atanh}{Hyperbolic}
\alias{cosh}{Hyperbolic}
\alias{sinh}{Hyperbolic}
\alias{tanh}{Hyperbolic}
\keyword{math}{Hyperbolic}
\begin{Description}\relax
These functions give the obvious hyperbolic functions.
They respectively compute the hyperbolic cosine, sine, tangent,
arc-cosine, arc-sine, arc-tangent.\end{Description}
\begin{Usage}
\begin{verbatim}
cosh(x)
sinh(x)
tanh(x)
acosh(x)
asinh(x)
atanh(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a numeric vector
\end{ldescription}
\end{Arguments}
\begin{SeeAlso}\relax
\code{\Link{cos}}, \code{\Link{sin}}, \code{\Link{tan}},
\code{\Link{acos}}, \code{\Link{asin}}, \code{\Link{atan}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
Ceps <- .Machine$double.eps # ``Computer epsilon''
x <- seq(-3, 3, len=200)
stopifnot(
 abs(cosh(x) - (exp(x) + exp(-x))/2) < 20*Ceps,
 abs(sinh(x) - (exp(x) - exp(-x))/2) < 20*Ceps,
 Mod(cosh(x) - cos(1i*x))       < 20*Ceps,
 Mod(sinh(x) - sin(1i*x)/1i)    < 20*Ceps,
 abs(tanh(x)*cosh(x) - sinh(x)) < 20*Ceps
)

## Inverse:
all(abs(asinh(sinh(x)) - x) < 10*Ceps)
x[abs(acosh(cosh(x)) - abs(x)) > 100*Ceps] #- imprecise for small x
all(abs(atanh(tanh(x)) - x) < 100*Ceps)

all(abs(asinh(x) - log(x + sqrt(x^2 + 1))) < 10*Ceps)
cx <- cosh(x)
all(abs(acosh(cx) - log(cx + sqrt(cx^2 - 1))) < 1000*Ceps)
\end{ExampleCode}
\end{Examples}

