\Header{Arithmetic}{Arithmetic Operators}
\alias{*}{Arithmetic}
\alias{+}{Arithmetic}
\alias{-}{Arithmetic}
\alias{/}{Arithmetic}
\alias{\%/\%}{Arithmetic}
\alias{\%\%}{Arithmetic}
\alias{\textasciicircum{}}{Arithmetic}
\keyword{arith}{Arithmetic}
\begin{Description}\relax
These binary operators perform arithmetic on vector objects.\end{Description}
\begin{Usage}
\begin{verbatim}
x + y
x - y
x * y
x / y
x ^ y
x %% y
x %/% y
\end{verbatim}
\end{Usage}
\begin{Details}\relax
\code{1 \textasciicircum{} y} and \code{y \textasciicircum{} 0} are \code{1}, \emph{always}.
\code{x \textasciicircum{} y} should also give the proper ``limit'' result when
either argument is infinite (i.e., \code{+- \Link{Inf}}).

Objects such as arrays or time-series can be operated on this
way provided they are conformable.\end{Details}
\begin{Value}
They return numeric vectors containing the result of the element
by element operations.  The elements of shorter vectors are recycled
as necessary (with a \code{\Link{warning}} when they are recycled only
\emph{fractionally}).  The operators are \code{+} for addition,
\code{-} for subtraction \code{*} for multiplication, \code{/} for
division and \code{\textasciicircum{}} for exponentiation.

\code{\%\%} indicates \code{x mod y} and \code{\%/\%} indicates integer
division.  It is guaranteed that \code{x  ==  (x \%\% y)  +  y * ( x \%/\% y )}
unless \code{y == 0} where the result is \code{\Link{NA}} or
\code{\Link{NaN}} (depending on the \code{\Link{typeof}} of the arguments).\end{Value}
\begin{SeeAlso}\relax
\code{\Link{sqrt}} for miscellaneous and \code{\Link{Special}} for special
mathematical functions.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
x <- -1:12
x + 1
2 * x + 3
x %% 2 #-- is periodic
x %/% 5
\end{ExampleCode}
\end{Examples}

