.BG
.VE $Header: /usr3/s/current/s/.help/RCS/arith,v 1.2 83/12/30 19:24:13 rab Exp $
.FN arith
.FN ^
.FN %/
.FN %%
.FN *
.FN **
.FN +
.FN -
.FN /
.TL
+    \-    /    *    ^    **    %%    %/  : Arithmetic Operators
.CS
expr1 op expr2
.PP
.AG expr
numeric structure.  Missing values (NAs) are allowed.
.RT
numeric result, mode is real if either `expr' is real.  The
exception is integer divide (%/), which truncates its
result, returning an integer.
.PP
The operator %% is the modulus function
defined as `expr1\-floor(expr1/expr2)' for `expr1!=0'
and `expr1' if `expr2==0' (see Knuth);
"^" and "**" are synonyms for exponentiation.
.SH REFERENCE
D. E. Knuth,
.ul
The Art of Computer Programming, Fundamental Algorithms
Vol. 1, Section 1.2.4.,
Addison Wesley, 1968,
.SH SEE ALSO
`precedence'.
.EX
x\-mean(x)
(1+(5:8)/1200)^12     # compound interest, 5:8 per annum monthly
.KW basic*
.KW math
.KW builtin
.WR
