






                             DOS Command Line Calculator
                                     SCALC 1.1.0
                                     1995/07/03s

          Introduction:

               Ever needed to make a calculation, but didn't have a
               calculator handy?  Well, maybe this program will be able to
               help you out in these instances.

               It is not one of those simple RPN (Reverse Polish Notation)
               styles where you have to work out operator precedence
               yourself.  Instead, this calculator is capable of
               interpreting arithmetic expressions properly based upon on
               the usual operator precedence interpretations.

               This program can provide the results formatted as integers,
               as real numbers, in scientific notation, or in engineering
               notation (exponent is multiple of 3).

               Integer input values can be expressed in octal, decimal, or
               hexadecimal notation.

               Angular units can be expressed in degrees, grads, or
               radians.

               Number of decimal places on results can be set.

               Mathematical functions include trig functions, inverse trig
               functions, hyperbolic functions, pi, e, int, frac, log, and
               ln.

               Computations are evaluted as 32 bit integers or 64 bit
               floating point values, as appropriate.

          Author:

               Raymond P. Burkholder              Phone:
                                                       (519) 570-4251
               Address:
                    Burkholder & Associates
                    42 Daniel Avenue
                    Kitchener, ON   N2K 1E9
                    Canada

               E-Mail:
                    Compuserve:    70202.103
                    Internet:      rpb@hookup.net

          Registration:

               This software is not in the public domain.  It is shareware. 
               As such,  please evaluate it for 30 days.  If, after that
               period you find it useful, please forward $15.00 (US or







               Canadian Currency is acceptable) to cover the cost of
               registration and shipping.  Otherwise, please remove the
               program from your system.  As part of registration, you will
               be mailed an upgrade version which includes the capability
               for storing and using current settings for the output
               formats and angular units.  Results can also be stored as
               variables for further use.  The registration nag will also
               be eliminated.

               Alternatively, you can register this software on-line
               through Compuserve's shareware registration service.  This
               program's Registration ID is 4911.

               In addition, if you can provide an e-mail address, I can let
               you know of future upgrades and releases.

          Syntax:

            scalc options arithmetic_expression

          Description:

               options

                    /fa

                    - Where 'a' is -1 or a number from 0 to 13.
                    - Specifies how many decimal places the result must
                    have.
                    - floating point numbers only make use of this
                    currently.
                    - '-1' is the default:  the program determines how many
                    decimal places to show.

                    /nb

                    - Where 'b' is e, n or s.
                    - Specifies output format for the result:
                         e:   engineering notation, exponents are stepped
                              by 3 (... 9, 6, 3, 0, -3, -6, -9 ...)
                         n:   default formatting (small integers as
                              integers, large integers and real numbers in
                              scientific notation)
                         s:   scientific notation.
                    - default formatting type is n.

                    /ac

                    - Where 'c' is d, r, or g.
                    - Specifies angular unit interpretation on input and
                    output:
                         d:   degrees
                         r:   radians
                         g:   grads







                    - 360 degrees = 2 pi radians = 400 grads

                    /bd

                    - Where 'd' is b, o, d, or h.
                    - Specifies output format for integers:
                         b:   binary
                         o:   octal
                         d:   decimal
                         h:   hexadecimal

               arithmetic_expression

                    numbers:
                         - octal, eg: 017 (is decimal 15)
                         - hexadecimal, eg: 0x10 (is decimal 16)
                         - integers, eg:  2, -678, 0
                         - real numbers, eg: 2.3, -3.4, 0., .0, .34, 3.
                         - scientific notation, eg:  -3.4e6, 5.6e-3

                    numeric ranges:
                              
                         - 32 bit signed integers (-2,147,483,648 ..
                              +2,147,483,647)
                              
                         - 8 byte, 15 significant digit floating point +/-
                              (2.2E-308 .. 1.8E+308)

                    operators:
                         - Constants:  e, pi
                              
                         - Unary operators:  sin, cos, tan, asin, acos,
                              atan, int (integer part), frac (fractional
                              part), log (base 10), ln (base e), cosh,
                              sinh, tanh, abs
                              
                           [Note:  these operators do not need brackets for
                              their parameters.  However depending upon
                              operator precedence.  For example, sin pi/2
                              is different from sin (pi/2)]
                              
                         - Binary operators:  +, -, *, /, % (remainder), ^
                              (power)
                         - Grouping operators:  (, )

                    operator precedence (highest to lowest):
                         (, )
                         unary -, unary +
                              
                         sin, cos, tan, asin, acos, atan, int, frac, log,
                              ln, cosh, sinh, tanh, abs
                         ^
                         *, /, %
                         -, +
                         
          Examples:

               Pentium floating point test (should yield 4195835):
                    scalc (4195835./3145727.)*3145727.
               When using 4Dos or NT command line, quotes are needed when







               using powers '^':
                    scalc "cos pi^2 + sin pi^2"
               Other examples:
                    scalc 3 * -5.2e-4
                    scalc 10 % 3
                    scalc /ne 5678.34986
               Environment variables can be included on command line.
                    In 4Dos:
                         set a=3.4
                         scalc %a*2
                    In dos:
                         set a=3.4
                         scalc %a%*2

          Thank you for using SCALC!  If you could use a Windows version,
          please let me know!

          Raymond P. Burkholder.
