CALC

Section: User Commands (1)
Updated: LOCAL
 

NAME

calc - a reverse polish notation (RPN) calculator.  

SYNOPSIS

calc [-h]|[-?]|["expression"]

 

DESCRIPTION

calc partially emulates a HP 28S and is intended for every-day purposes (i.e. 1 1 + ), not for complex calculations. These specialties have not been implemented:

 - complex numbers,

 - vector, matrices, lists and arrays,

 - "normal" algebraic input,

 - variables.

calc recognizes the following functions and operations:

push   pop     pick    swap    over    roll    dup     dupn    drop    dropn   depth

chs    +       -       *       /       &       |       inv     sqrt    sqr

sin    cos     tan asin    acos    atan    atan2
4-quadrant atan
sinh   cosh    tanh    asinh   acosh   atanh

ln     log     ld      exp     alog    shl

j0     j1      jn      y0      y1      yn
Bessel Functions
erf    erfc    lgamma
Error Function, 1-erf, ln(abs(gamma(x)))
abs    ceil    fact    mod     gcd

hex    dec

pi(=3.14159265) e(=2.71828182)

Delimiters are , , space , tab and newline. A few things have been added with respect to a HP28: the prefixes 0x and 0 stand for hexadecimal and octal constants respectivly, as in C. The Bessel Functions and the error functions are new, in order to make better use of the math library. No matter which display mode your are in, the output is always shown in both Hex and Decimal values.

 

OPTIONS

-h stands for help

 

BUGS

The Floating Point Exception Handling relies on the math library and may be site-dependent.

 

NOTES

HP 28S is a trademark of Hewlett Packard Instruments.

 

COPYRIGHT


 Copyright 1993, 1994 David Frey.
   calc is free software; you can distribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation.  

AUTHOR


 David Frey
   

SEE ALSO

bc(1)