From: rao@moose.cccs.umn.edu (Rao Akella)
Subject: Re: lOOking for Calculator program
Keywords: calculator
Reply-To: rao@moose.cccs.umn.edu
Organization: Colon Cancer Control Study, University of Minnesota, Minneapolis
Date: Wed, 11 Nov 1992 03:51:30 GMT


In article <1992Nov7.232746.46@lancc.uucp>, rick@lancc.uucp writes:
> 
> I'm looking for a simple "calculator" type program that runs under
> VMS.
> Anybody seen a good (quick) public domain one around?

Pick up the file ICALC.TXT via anonymous ftp from moose.cccs.umn.edu
[128.101.133.53] and follow the instructions contained therein.

If you do not have FTP access, please contact me somehow with some form
of
e-mail/paper-mail address, and I'll post it to you personally.

ICALC is a simple, portable infix calculator which compiles on
VMS, Unix and DOS with no changes required (for most "standard"
C environments).

Features:
~~~~~~~~
    1) Addition (+), Subtraction (-), Multiplication (*), Division (/)

    2) Modulus (%), Power (^)

    3) Bitwise logical operators: bitwise AND (&), bitwise inclusive
       OR (|), unary one's complement (~)

    4) 20 Math/Trigonometric functions: sin, cos, tan, asin, acos,
atan,
       sinh, cosh, tanh, exp (exponentiation), ln (natural log),
       log (base 10 log), sqrt (square root), ceil (ceiling), floor,
       int/trunc (truncation), abs (absolute value),
       degtorad (degrees->radians), radtodeg (radians->degrees).

       Two Date functions to convert between calendar dates and julian
       days: caltojul (calendar->julian date) and jultocal
       (julian->calendar date).

       One '?'-for-help command to display a help screen of all
       supported commands and functions.

    5) Temporary variables (as many as you want, with names as long as
       you want) to store intermediate computations.

    6) This is a "portable" calculator in the sense that it's not
       specific to any operating system.  The yacc output should be
       compilable by any C compiler; this program has been tested on
       Unix, VAX/VMS and PC/MS-DOS, and has required no changes to
       compile.

    7) This program uses the simplest of input and output formats, and
       is in no way hardware dependent.  So, as long as it compiles
       without any problems, there are no other requirements for it to
       work properly.

    8) All numbers are of the C floating-point type "double", which,
       according to the VAX C manual, has a range of 0.29*10^-38 to
       1.7*10^38, and has values precise to 16 decimal digits.

    9) Allows any number of expressions on a line, separated by ';'

   10) icalc can now be run either interactively (when it is
       invoked without any arguments, in which case the user is
       prompted for input) or in a command-line mode (when all
       expressions to be computed are passed to icalc via
       command-line "argv" arguments, in which case icalc computes
       and prints the result of each expression -- exactly as if
       it had been entered interactively -- and then exits).
       In the latter case, the user is supposed to delimit/
       separate the expressions by ';'


-- Rao Akella    <rao@moose.cccs.umn.edu, rao%moose@umnacvx.bitnet>