


CALC(1STAT)         UNIX Programmer's Manual          CALC(1STAT)



NNNNAAAAMMMMEEEE
     calc - calculator

SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
     ccccaaaallllcccc

DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
     _C_a_l_c is a calculator for doing real arithmetic using fami-
     liar infix notation.  _C_a_l_c uses a calculation method based
     on the popular program VisiCalc in that it allows variables
     to be define by equations.  For example,
                            A = B + C * D
     says that whatever B, C, and D are, A is equal to the above
     function of them.  If B, C, or D change, then so does the
     value of A because it depends on them.  (To set A to the
     value of a function of several variables so that it doesn't
     change over time, you prepend a # before the = sign to
     emphasize you want the current value.) In _c_a_l_c, you get the
     prompt, "CALC: ", and you type in an expression to be calcu-
     lated.  You can use numbers and even variables.  For exam-
     ple,

     12 + 123/6
     a = b^2 + log (sqrt (c))
     AVeryLongVariableName = (a+b) - c*d/e ^ f%log (sqrt (exp (abs (x))))

     The usual operators and precedences are available along with
     the common mathematical functions.  Parentheses can be used
     for clarity.

SSSSEEEEEEEE AAAALLLLSSSSOOOO
     Calc: A calculator program, Gary Perlman, Cognitive Science
     Laboratory.

AAAAUUUUTTTTHHHHOOOORRRR
     Gary Perlman

BBBBUUUUGGGGSSSS
     _C_a_l_c will not allow backward influences caused by a series
     of expressions like
            a = sqrt (b^2 + c^2)
            b = sqrt (a^2 + c^2)
     The above says that _a is defined in terms of _b which is
     defined in terms of _a causing an infinite regress.  Future
     versions may allow backward influences without blowing up.










Printed 11/22/82         March 14, 1981                         1



