AF(1G) COMMAND REFERENCE AF(1G)
NAME
af - arithmetic function
SYNOPSIS
af [ -cn ] [ -t ] [ -v ] expression ...
DESCRIPTION
Output is the result of executing the expression(s) once per
complete set of input values. Input comes from vectors
specified in expression.
Expression operands are:
Vectors:
filenames with the restriction that they must begin with
a letter and be composed only from letters, digits, '',
and '.'. The first unknown filename (one not in the
current directory) references the standard input.
Functions:
the name of a command followed by the command arguments
in parentheses. Arguments are written as on the command
line, separated by spaces.
Constants:
floating point and integer (but not E notation).
Expression operators are, in order of decreasing precedence:
'v next value from vector v.
x^y, -x x raised to the y power, negation of x; both
associate right to left.
x*y, x/y, x%y x multiplied by, divided by, modulo y,
respectively; all associate left to right.
x+y, x-y x plus, minus y, respectively; both associate
left to right.
x,y output the value of x followed by the value
of y; associates from left to right
Parentheses may be used to alter precedence. Because many
of the operator characters are special to the shell it is
good practice to surround expressions in quotes.
OPTIONS
-cn n elements per line in the output.
-t output is titled from the vector on the standard input.
Printed 10/17/86 1
AF(1G) COMMAND REFERENCE AF(1G)
-v verbose mode, function expansions are echoed.
EXAMPLES
af "3+4*5"
yields 23.
af "A,'A,A+'A,B"
yields a four column matrix with columns of
1) odd elements from A,
2) even elements from A,
3) sum of adjacent odd and even elements, and
4) elements from B.
af "sin(A)^2"
yields the square of the sine of the elements of A.
SEE ALSO
abs(1g), bar(1g), bel(1g), bucket(1g), ceil(1g), cor(1g),
cusum(1g), cvrtopt(1g), dtoc(1g), erase(1g), exp(1g),
floor(1g), gamma(1g), gas(1g), gd(1g), ged(1g),
graphics(1g), gtop(1g), hardcopy(1g), hilo(1g), hist(1g),
hpd(1g), intro(1g), label(1g), list(1g), log(1g), lreg(1g),
mean(1g), mod(1g), pair(1g), pd(1g), pie(1g), plot(1g),
point(1g), power(1g), prime(1g), prod(1g), ptog(1g),
qsort(1g), quit(1g), rand(1g), rank(1g), remcom(1g),
root(1g), round(1g), siline(1g), sin(1g), subset(1g),
td(1g), tekset(1g), title(1g), total(1g), ttoc(1g), var(1g),
vtoc(1g), whatis(1g), yoo(1g), and gps(5g).
Printed 10/17/86 2
%%index%%
na:72,60;
sy:132,173;
de:305,1727;
op:2032,189;2365,68;
ex:2433,415;
se:2848,1449;
%%index%%000000000116