home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 112.lha / CALCULA.doc < prev    next >
Encoding:
Text File  |  1986-11-20  |  6.0 KB  |  165 lines

  1.     
  2.                     HERMES' CALCULA   (Version 1.0)
  3.  
  4.                      Copyright (c) A. G. Kartsatos 
  5.  
  6.            (CIS = 76617,121, GEnie = XTH58515, PLink = HERMES)
  7.  
  8.                             March 10, 1988
  9.  
  10.                      ***  Shareware Program  ***
  11.  
  12.  
  13.      Here is a program that can be quite valuable to a lot of people who
  14. have to use mathematical functions in their work.  Students, scientists
  15. and engineers will find it particularly helpful.
  16.      It is what we call an "Expression Parser".
  17.   
  18.      ATTENTION:  The "topaz 11" font should be in your current "fonts" 
  19. directory. If it is not there, you will get the program running with funny
  20. fonts!
  21.  
  22.      To use it from the CLI: Press "RUN CALCULA".
  23.      To use it from the Workbench: Click its icon.
  24.      To exit, choose "QUIT" from the menu.
  25.  
  26.      Calcula actually evaluates any valid expression involving the
  27. 17 supported algebraic and trigonometric functions, 3 constants involving
  28. PI and 5 algebraic operations.  
  29.      In order to use Calcula, do the following:
  30.  
  31.      (1)  Insert the function to be evaluated in the "FUNCTION" gadget. 
  32.      
  33.      (2)  Insert the values (if needed) for any of the variables X, Y, Z in 
  34.           their respective gadgets.
  35.  
  36.      (3)  Click the "EVALUATE" gadget.
  37.  
  38.      The value of the function is given in the "RESULT" gadget.
  39.  
  40.      REMEMBER:
  41.  
  42.      (I)    Use only parentheses. No brackets are allowed.
  43.  
  44.      (II)   The function must be at most 100 characters long.
  45.  
  46.      (III)  This version does not support scientific notation.  Also, all
  47.             trigonometris functions are evaluated on angles expressed in
  48.             radians.  Use the rad function to convert degrees to radians.
  49.             This means degrees with decimals like: rad(87.6).
  50.  
  51.      (IV)   Avoid the use of numbers with more than 13 digits before
  52.             the decimal point and/or 9 digits after the decimal point.
  53.  
  54.      (V)    Exponential expressions grow or decay very fast.  The largest
  55.             power I have allowed for e is 32. (exp(32.)).
  56.  
  57.      (VI)   Check the available functions, operators, and constants by
  58.             choosing "FUNCTIONS" from the menu.  Make sure that you are
  59.             using the right notation for your functions.
  60.  
  61.      (VII)  To "CLEAR" ONE of the string gadgets, click into it and press
  62.             RIGHT-AMIGA-X.  Press "CLEAR ALL" to clear ALL the string
  63.             gadgets.
  64.  
  65.      (VIII) You may use spaces between any expressions.  No problem.
  66.  
  67.      (IX)   Lower or upper case letters are allowed anywhere.  The program
  68.             turns them all into upper case.
  69.  
  70.      (X)    For the sake of speed I have omitted error messages for a whole
  71.             lot of nonsensical things that can happen.  For example, if
  72.             you insert HERMES in the X-gadget, the program will read it
  73.             as 0.000000.  Make sure your input makes sense mathematically.
  74.  
  75.      (XI)   The result is always given with 6 decimal places.  The program
  76.             will prohibit the generation of numbers that are too large to
  77.             print and/or prone to carry prohibitive sizes of error.
  78.  
  79.      (XII)  CTRL-N gets you to the Workbench and CTRL-M gets you back to
  80.             CALCULA.  If you are planning to work on the Workbench while
  81.             CALCULA is running, make sure to run it with "RUN CALCULA"
  82.             and not just "CALCULA".
  83.  
  84.      (XIII) The built in parameters pi, tpi and pit denote the numbers
  85.             PI, 2*PI and PI/2, respectively.
  86.  
  87.      (XIV)  The function "as" (asin) has values in the interval [-pit,pit];
  88.             The function "ac" (acos) has values in the interval [0,pi];
  89.             The function "atan" has values in the interval [-pit,pit];
  90.             The domain of "as" and "ac" is the interval [-1,1];
  91.  
  92.      (XV)   When you raise a function to a power, make sure you enclose
  93.             the function in parentheses.  For example, you should use
  94.             (exp(1.89))**2 instead of exp(1.89)**2.  The same remark applies
  95.             to other similar situations.
  96.  
  97.      HERE IS AN EXAMPLE:
  98.  
  99.      FUNCTION: sin(x**2.-6.78*y)+cos(pi-atan(4.56))+abs(ln(1.23+exp(.2*z)))
  100.  
  101.                 X                  Y                Z  
  102.             
  103.               .023               -3.45            22.957
  104.     
  105.  
  106.                        RESULT: 3.404071 
  107.  
  108.      ANOTHER EXAMPLE:
  109.  
  110.      FUNCTION: ac(cos(as(sin(tan(atan(ln(exp(log(10**1.23)))))))))
  111.  
  112.                        RESULT: 1.23
  113.  
  114.      THIRD EXAMPLE:
  115.  
  116.      FUNCTION: x**2 + y**2 + sin(ac(1.23)) + tan(9.04)
  117.  
  118.                 X                  Y                Z
  119.  
  120.                 3.              -2.008
  121.  
  122.      Error!  Domain Problem With The Acos Function
  123.  
  124.      (The argument of the acos function should be between -1 and 1).
  125.  
  126.      FOURTH EXAMPLE:
  127.  
  128.      FUNCTION: as(log(1.45+x**y)) - ln(sin(x+z))
  129.  
  130.                 X                  Y                Z
  131.  
  132.                -.56                2              3.876
  133.  
  134.      Error!  Domain Problem With The Ln Function
  135.     
  136.      (The function sin(x+z) passes a negative value to the argument of ln).
  137.  
  138.                              ***  <<<-->>>  ***
  139.  
  140.      This is a SHAREWARE copyrighted program.  If you find it useful, 
  141. please send $15.00 to:
  142.                
  143.                 A. G. Kartsatos   (= HERMES = SOULI)
  144.                 8524 Caladesi Island Drive
  145.                 Tampa, FL 33637
  146.                 (Telephone: 813-988-2146)
  147.  
  148.      With this contribution you will receive more programs written by the
  149. author.
  150.      He is also the sysop of MON AMI in Tampa, FL.  A free bulletin board
  151. with 1300 files online and a healthy message base. 
  152.  
  153.                 MON AMI Telephone: 813-985-7624
  154.  
  155.      NOTE:  The author will configure your copy of CALCULA so that it can
  156. compute any particular function that you would like by building it in.
  157.  
  158.      Feel free to distribute this program, with the doc intact, to any
  159. bulletin boards and other non-profit establishments in the US and abroad.
  160.      These include PLink, Compuserve, GEnie, Delphi, etc.
  161.      The inclusion of this program, or any part of it, in any form in a 
  162. commercial package, or its use for commercial purposes, requires the 
  163. written permission of the author.
  164.      
  165.