
CALC(1)                UNIX User's Manual                 CALC(1)

NAME
     calc - algebraic formula calculator with variables

SYNOPSIS
     calc [files]

DESCRIPTION
     _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.

SEE ALSO
     Calc: A calculator program, G. Perlman, Cognitive Science
     Laboratory, UCSD.

AUTHOR
     Gary Perlman

BUGS
     _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.  Version
     1.2 and later of _c_a_l_c should no longer blow up with these,
     because it does not allow them.

KEYWORDS
     statistics, data analysis

Printed 5/30/85           March 5, 1985                         1

