| Line 51... |
Line 51... |
| 51 |
as necessary (with a \code{\link{warning}} when they are recycled only
|
51 |
as necessary (with a \code{\link{warning}} when they are recycled only
|
| 52 |
\emph{fractionally}). The operators are \code{+} for addition,
|
52 |
\emph{fractionally}). The operators are \code{+} for addition,
|
| 53 |
\code{-} for subtraction, \code{*} for multiplication, \code{/} for
|
53 |
\code{-} for subtraction, \code{*} for multiplication, \code{/} for
|
| 54 |
division and \code{^} for exponentiation.
|
54 |
division and \code{^} for exponentiation.
|
| 55 |
|
55 |
|
| 56 |
\code{\%\%} indicates \code{x mod y} (\dQuote{x modulo y}), i.e.,
|
56 |
\code{\%\%} indicates \code{x} mod \code{y} (\dQuote{x modulo y}), i.e.,
|
| 57 |
computes the \sQuote{remainder} \code{r <- x \%\% y}, and
|
57 |
computes the \sQuote{remainder} \code{r <- x \%\% y}, and
|
| 58 |
\code{\%/\%} indicates integer division, where \R uses \dQuote{floored}
|
58 |
\code{\%/\%} indicates integer division, where \R uses \dQuote{floored}
|
| 59 |
integer division, i.e., \code{q <- x \%/\% y := floor(x/y)}, as promoted
|
59 |
integer division, i.e., \code{q <- x \%/\% y := floor(x/y)}, as promoted
|
| 60 |
by Donald Knuth, see the Wikipedia page on \sQuote{Modulo operation},
|
60 |
by Donald Knuth, see the Wikipedia page on \sQuote{Modulo operation},
|
| 61 |
and hence \code{sign(r) == sign(y)}. It is guaranteed that
|
61 |
and hence \code{sign(r) == sign(y)}. It is guaranteed that
|