| 94 |
|
.PP |
| 95 |
|
The variable and function definitions in each |
| 96 |
|
.I \-f source |
| 97 |
< |
file are read and compiled. |
| 97 |
> |
file are read and compiled from the RADIANCE library where it is found. |
| 98 |
|
The |
| 99 |
|
.I \-e expr |
| 100 |
|
option can be used to define variables on the command line. |
| 202 |
|
.PP |
| 203 |
|
+ - * / ^ |
| 204 |
|
.PP |
| 205 |
< |
Operators are evaluated left to right. |
| 205 |
> |
Operators are evaluated left to right, except '^', |
| 206 |
> |
which is right associative. |
| 207 |
|
Powers have the highest precedence; multiplication and |
| 208 |
|
division are evaluated before addition and subtraction. |
| 209 |
|
Expressions can be grouped with parentheses. |
| 235 |
|
This provides a convenient method for avoiding inappropriate calculations. |
| 236 |
|
The following library of pre-defined functions and variables is provided: |
| 237 |
|
.TP 10n |
| 238 |
+ |
.BR \$N |
| 239 |
+ |
Return the value for input column |
| 240 |
+ |
.I N. |
| 241 |
+ |
If an input format is given, using a channel number generates an error. |
| 242 |
+ |
.TP |
| 243 |
|
.BR "in(n)" |
| 244 |
|
Return the value for input column |
| 245 |
|
.I n, |
| 299 |
|
inverse trigonometric functions. |
| 300 |
|
.TP |
| 301 |
|
.BR "atan2(y, x)" |
| 302 |
< |
inverse tangent of y/x (range -pi to pi). |
| 302 |
> |
inverse tangent of y/x (range \-pi to pi). |
| 303 |
|
.SH EXAMPLE |
| 304 |
|
To print the square root of column two in column one, |
| 305 |
|
and column one times column three in column two: |
| 306 |
|
.IP "" .2i |
| 307 |
< |
rcalc -e '$1=sqrt($2);$2=$1*$3' inputfile > outputfile |
| 307 |
> |
rcalc \-e '$1=sqrt($2);$2=$1*$3' inputfile > outputfile |
| 308 |
> |
.SH ENVIRONMENT |
| 309 |
> |
RAYPATH the directories to check for auxiliary files. |
| 310 |
|
.SH AUTHOR |
| 311 |
|
Greg Ward |
| 312 |
|
.SH BUGS |
| 316 |
|
.PP |
| 317 |
|
Tabs count as single spaces inside fields. |
| 318 |
|
.SH "SEE ALSO" |
| 319 |
< |
cnt(1), ev(1), getinfo(1), icalc(1), rlam(1), tabfunc(1), total(1) |
| 319 |
> |
cnt(1), ev(1), getinfo(1), icalc(1), rcollate(1), rlam(1), tabfunc(1), total(1) |