\Header{abs}{Miscellaneous Mathematical Functions}
\alias{sqrt}{abs}
\keyword{math}{abs}
\begin{Description}\relax
These functions compute miscellaneous mathematical functions.
The naming follows the standard for computer languages
such as C or Fortran.
\end{Description}
\begin{Usage}
\begin{verbatim}
abs(x)
sqrt(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a numeric or \code{\Link{complex}} vector or array.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
These are generic functions: methods can be defined for them
individually or via the \code{\Link{Math}} group generic.  For complex
arguments (and the default method), \code{z},
\code{abs(z) == \Link{Mod}(z)} and \code{sqrt(z) == z\textasciicircum{}0.5}.
\end{Details}
\begin{References}\relax
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
\emph{The New S Language}.
Wadsworth \& Brooks/Cole.
\end{References}
\begin{SeeAlso}\relax
\code{\Link{Arithmetic}} for simple, \code{\Link{log}} for logarithmic,
\code{\Link{sin}} for trigonometric, and \code{\Link{Special}} for
special mathematical functions.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
require(stats) # for spline
xx <- -9:9
plot(xx, sqrt(abs(xx)),  col = "red")
lines(spline(xx, sqrt(abs(xx)), n=101), col = "pink")
\end{ExampleCode}
\end{Examples}

