home *** CD-ROM | disk | FTP | other *** search
/ Dream 49 / Amiga_Dream_49.iso / beos / utils / unixcalc-1.000 / unixcalc1.4.txt < prev   
Text File  |  1998-01-04  |  9KB  |  215 lines

  1. WHAT IS IT?
  2.    UnixCalc is a command line calculator which can evaluate algebraic
  3. equations and uses non-volatile history lists to store unlimited
  4. equations, calculated results, and arbitrarily-named variables.  There
  5. are several numerical display modes which include floating point,
  6. scientific, and engineering notation.  The scientific mode supports
  7. imaginary numbers for most functions.  Standard functions
  8. (+,-,*,/,Sqrt,^) are accurate to more than 50 digits.  Based numbers
  9. (2 to 16) are also supported along with all the standard logical
  10. operators (see table below).
  11.  
  12. Some additional features are:
  13.     o imaginary numbers and functions
  14.     o unlimited named variables (up to 16 characters long)
  15.     o automatic history logging of both equations and results
  16.     o full scientific, transcendental, power, and logarithmic operations
  17.     o programmer functions like and, or, shift, rotate, etc., on 172-bits!
  18.     o choice of radian, degree, or gradian angle measurements
  19.     o from 8 to 52 digits
  20.     o numbers from -1E9999 to 1E9999
  21.     o exact decimal number representation
  22.     o convenience functions like square and cube roots, reciprocal, etc.
  23.     o persistant variables, equations, and state
  24.  
  25. RELATED TOOLS
  26.    If you prefer a GUI-based calculator with the same features as
  27. UnixCalc, ExCalc is available for the Amiga on the Aminet & Fish
  28. Disks.  BeCalc for the BeBox will also soon be available.  Both
  29. calculators are shareware products.
  30.  
  31. CHANGES
  32.   UnixCalc now requires OO2C and its new libraries so it will no
  33. longer compiler with O2C.  DO NOT upgrade if you don't want to
  34. rebuild using OO2C, although why you wouldn't want to use OO2C,
  35. which builds faster executables, I don't want to know.
  36.    The source code was also cleaned up a bit to work directly
  37. with the new OO2C library and remove stub modules.
  38.    A new Help command is available which lists all the available
  39. functions and a brief description of each one.
  40.    A bug has been fixed in the string to hexadecimal conversion
  41. routine.
  42.  
  43. TO BUILD & INVOKE
  44.    OO2C and GCC are required to build the executable image for
  45. UNIXCALC.  OO2C can be obtained from http://www.uni-kl.de/ooc.
  46. GCC is generally available from most internet sites.  Once the above
  47. two packages are installed, just type "oo2c -Mv UnixCalc" to build the
  48. calculator.
  49.    The executable can be placed in any suitable directory.  UnixCalc
  50. creates several configuration files in the user's home directory to
  51. store variables and a history list of equations and previous results.
  52. NOTE: This release changes the format of the .CalculatorState.bin
  53. file so you may have to delete this file to get the variable lists
  54. working properly.
  55.    To start a session, type "UnixCalc" and enter an expression to be
  56. evaluated at the prompt.  For example, "UnixCalcD> " is the prompt
  57. which normally appears when the calculator is using base 10 numbers
  58. and using degree measurements for angles.  An empty line will
  59. terminate UnixCalc.
  60.  
  61.  
  62. EQUATION SYNTAX
  63.    Equations are entered using infix notation like "23.4 + 56".
  64. Brackets can be used to explicitly order the expression evaluation
  65. order although standard mathematical ordering is supported (e.g.,
  66. 23+6*5 gives 53 NOT 145).  Most functions like Sin, Cos, etc. use a
  67. single argument which follows the function.  Brackets are not strictly
  68. required (i.e., Sin 45 will evaluate correctly) but are recommended to
  69. avoid ambiguities with equations like Sin 45+23 which first evaluates
  70. Sin 45 and then adds 23 to this number.  An exception to the single
  71. argument rule for functions are the Min/Max functions which take two
  72. arguments separated by a semicolon.  
  73.    All functions can be nested to an arbitrary depth (limited by the
  74. stack size on the host computer).  Maximum expression length is 250
  75. characters although expressions can be strung together by storing
  76. intermediate results in variables and using the variable in subsequent
  77. calculations.  For example: Sqrt(56^2 + 23^2) ST Root1 saves the
  78. answer in a named variable called Root1.  All variables and function
  79. names are case sensitive, so Root1 is different from ROOT1.  Typing
  80. the name of a variable by itself returns the contents of that
  81. variable.  Attempting to access a variable which has not been defined
  82. returns an error.  A maximum of 20 variables are allowed in this
  83. version of UnixCalc of which the first 16 are predefined for you as
  84. M0 to M15.  If you attempt to define more than this number
  85. of variables, you will get an error message.  Delete one or more
  86. variables with the "DEL <variable>" command.  All defined variables
  87. can be displayed with the "List" command.
  88.    Numbers can use separator characters like ",", "'", and "_" (e.g.,
  89. "3,143.43" and "0FFF_1234_0000").  For European countries it is also
  90. possible to swap the '.' and ',' characters -- although this is not
  91. explicitly supported in this version of the calculator.  Contact me
  92. at the address below if you would like to know how to make this
  93. change to the calculator.  Displayed numbers are always without
  94. separator characters although, once again, number displays with
  95. separators are supported by modifying some internal settings.
  96.    The table below lists the supported keywords by the equation parser
  97. (any octal codes if shown as readable characters on your system can
  98. also be used to invoke the corresponding function):
  99.  
  100.           +                    Addition
  101.       -                  Subtraction
  102.       *,╫                  Multiplication
  103.       /,≈                  Division
  104.       ▓                  Squared
  105.       │                  Cubed
  106.       -╣,»╣                  Reciprocal
  107.       ()                  Brackets
  108.       ^, **                  Power
  109.       %                  ╫ 0.01
  110.       &, And              Logical And
  111.       |, Or                  Logical Inclusive Or
  112.       Xor                  Logical Exclusive Or
  113.         ~,Not                  Logical Complement
  114.       Mod                  Modulo
  115.       Div                  Integer Division
  116.       Sqrt                  Square Root
  117.       Cbrt                  Cube Root
  118.       Root                  Any Root
  119.           Abs                             Absolute value
  120.           Rand                            Random number between 0 and 1
  121.       e                  Natural Log Base
  122.       e^                  Power of e
  123.           i,í                   Imaginary number
  124.           °                   Complex angle
  125.           Im                              Imaginary part of a number
  126.           Re                              Real part of a number
  127.           ╗í                  Polar to rectangle conversion
  128.           r                               Complex magnitude
  129.           Conj                  Complex conjugate
  130.           Conv <n>                        Convert n units to destination units
  131.           nCr                             Factorial combinations
  132.           nPr                             Factorial permutations
  133.           Frac                            Fractional part of a number
  134.           Int                             Integer part of a number
  135.           Sign                   Sign of a number (-1 or 1)
  136.        Plot <expression>               Plot the expression as f(M0) (not supported -- yet)
  137.           Min(<x>;<y>)                    Minimum of x and y
  138.           Max(<x>;<y>)                    Maximum of x and y
  139.       Ln                  Natural Logarithm
  140.       Log                  Base 10 Logarithm
  141.       Sin, ASin, Sin»╣            Sine, Arcsine
  142.       Cos, ACos, Cos»╣          Cosine, Arccosine
  143.       Tan, ATan, Tan»╣          Tangent, Arctangent
  144.       Sinh, ASinh, Sinh»╣          Hyperbolic Sine, Arcsine
  145.       Cosh, ACosh, Cosh»╣          Hyperbolic Cosine, Arccosine
  146.       Tanh, ATanh, Tanh»╣          Hyperbolic Tangent, Arctangent
  147.       SBit                  Set Bit
  148.       CBit                  Clear Bit
  149.       TBit                  Toggle Bit
  150.       Shr                  Shift Right
  151.       Shl                  Shift Left
  152.       Asr                  Arithmetic Shift Right
  153.       Ror                  Rotate Right
  154.       Rol                  Rotate Left
  155.       <var-name>                  Variable contents
  156.       ST <var-name>                  Store to variable
  157.           DEL <var-name>          Deletes the variable
  158.       List                  Lists all defined variables
  159.           Help, help                      Displays this list
  160.       Pi                  Constant Pi
  161.       SCI                  Toggle Scientific/Floating Point
  162.       BAS n                  Change to Base n
  163.       DIG n                  Use n Digits
  164.       DP n                  Use n Decimal Places
  165.       DRG                  Toggle Degree/Radian/Grad
  166.  
  167.  
  168. LEGAL STUFF
  169.     UnixCalc -- a command line calculator
  170.     Copyright (C) 1996-1998 Michael Griebling
  171.  
  172.     UnixCalc is free software; you can redistribute it and/or modify
  173.     it under the terms of the GNU General Public License as published by
  174.     the Free Software Foundation; either version 2 of the License, or
  175.     (at your option) any later version.
  176.  
  177.     UnixCalc is distributed in the hope that it will be useful,
  178.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  179.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  180.     GNU General Public License for more details.
  181.  
  182.     You should have received a copy of the GNU General Public License
  183.     along with UnixCalc; see the file COPYING.  If not, write to
  184.     the Free Software Foundation, 59 Temple Place - Suite 330,
  185.     Boston, MA 02111-1307, USA.
  186.  
  187.  
  188. CONTACT
  189.              Michael Griebling
  190.              c/o Computer Inspirations
  191.              150 Clark Blvd., Suite One
  192.              Brampton, Ontario
  193.              Canada, L6T 4Y8
  194.  
  195.              Tel/FAX: (905) 840-7964
  196.  
  197.              e-mail: mgriebling@inpired.to
  198.          http://www.inspired.to/be
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.