\HeaderA{abs}{Miscellaneous Mathematical Functions}{abs}
\aliasA{sqrt}{abs}{sqrt}
\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{\LinkA{complex}{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{\LinkA{Math}{Math}} group generic.  For complex
arguments (and the default method), \code{z},
\code{abs(z) == \LinkA{Mod}{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{\LinkA{Arithmetic}{Arithmetic}} for simple, \code{\LinkA{log}{log}} for logarithmic,
\code{\LinkA{sin}{sin}} for trigonometric, and \code{\LinkA{Special}{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}

