home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Elysian Archive
/
AmigaElysianArchive.iso
/
bus_pers
/
calcula.arc
/
CALCULA.doc
< prev
next >
Wrap
Text File
|
1988-12-13
|
8KB
|
198 lines
HERMES' CALCULA (Version 1.0)
Copyright (c) 1988 A. G. Kartsatos
(CIS = 76617,121, GEnie = XTH58515, PLink = HERMES)
*** Shareware Program ***
Here is a program that can be quite valuable to a lot of people who
have to use mathematical functions in their work. Students, scientists
and engineers will find it particularly helpful.
It is what we call an "Expression Parser".
ATTENTION: The "TOPAZ 11" font should be in your current "fonts"
directory. If it is not there, you will get the program running with funny
fonts!
To use it from the CLI: Press "RUN CALCULA".
To use it from the Workbench: Click its icon.
To exit, choose "QUIT" from the menu.
Calcula actually evaluates any valid expression involving the
17 supported algebraic and trigonometric functions, 3 constants involving
PI and 5 algebraic operations.
In order to use Calcula, do the following:
(1) Insert the function to be evaluated in the "FUNCTION" gadget.
(2) Insert the values (if needed) for any of the variables X, Y, Z in
their respective gadgets.
(3) Click the "EVALUATE" gadget.
The value of the function is given in the "RESULT" gadget.
REMEMBER:
(I) Use only parentheses. No brackets are allowed.
(II) The function must be at most 100 characters long.
(III) This version does not support scientific notation. Also, all
trigonometris functions are evaluated on angles expressed in
radians. Use the rad function to convert degrees to radians.
This means degrees with decimals like: rad(87.6).
(IV) Avoid the use of numbers with more than 13 digits before
the decimal point and/or 9 digits after the decimal point.
(V) Exponential expressions grow or decay very fast. The largest
power I have allowed for e is 32. (exp(32.)).
(VI) Check the available functions, operators, and constants by
choosing "FUNCTIONS" from the menu. Make sure that you are
using the right notation for your functions.
(VII) To "CLEAR" ONE of the string gadgets, click into it and press
RIGHT-AMIGA-X. Press "CLEAR ALL" to clear ALL the string
gadgets.
(VIII) You may use spaces between any expressions. No problem.
(IX) Lower or upper case letters are allowed anywhere. The program
turns them all into upper case.
(X) For the sake of speed I have omitted error messages for a whole
lot of nonsensical things that can happen. For example, if
you insert HERMES in the X-gadget, the program will read it
as 0.000000. Make sure your input makes sense mathematically.
(XI) The result is always given with 6 decimal places. The program
will prohibit the generation of numbers that are too large to
print and/or prone to carry prohibitive sizes of error.
(XII) CTRL-N gets you to the Workbench and CTRL-M gets you back to
CALCULA. If you are planning to work on the Workbench while
CALCULA is running, make sure to run it with "RUN CALCULA"
and not just "CALCULA".
(XIII) The built in parameters pi, tpi and pit denote the numbers
PI, 2*PI and PI/2, respectively.
(XIV) The function "as" (asin) has values in the interval [-pit,pit];
The function "ac" (acos) has values in the interval [0,pi];
The function "atan" has values in the interval [-pit,pit];
The domain of "as" and "ac" is the interval [-1,1];
(XV) When you raise a function to a power, make sure you enclose
the function in parentheses. For example, you should use
(exp(1.89))**2 instead of exp(1.89)**2. The same remark applies
to other similar situations.
HERE IS AN EXAMPLE:
FUNCTION: sin(x**2.-6.78*y)+cos(pi-atan(4.56))+abs(ln(1.23+exp(.2*z)))
X Y Z
.023 -3.45 22.957
RESULT: 3.404071
ANOTHER EXAMPLE:
FUNCTION: ac(cos(ln(exp(tan(atan(log(10**(sq(1.23**2)))))))))
RESULT: 1.23
THIRD EXAMPLE:
FUNCTION: x**2 + y**2 + sin(ac(1.23)) + tan(9.04)
X Y Z
3. -2.008
Error! Domain Problem With The Acos Function
(The argument of the acos function should be between -1 and 1).
FOURTH EXAMPLE:
FUNCTION: as(log(1.45+x**y)) - ln(sin(x+z))
X Y Z
-.56 2 3.876
Error! Domain Problem With The Ln Function
(The function sin(x+z) passes a negative value to the argument of ln).
*** <<<-->>> ***
This is a SHAREWARE copyrighted program. If you find it useful,
please send $15.00 to the address at the end.
With this contribution you will receive more programs written by the
author.
NOTE: The author will configure your copy of CALCULA so that it can
compute any particular function that you would like by building it in.
Feel free to distribute this program, with the doc intact, to any
bulletin boards and other non-profit establishments in the US and abroad.
These include PLink, Compuserve, GEnie, Delphi, etc.
The inclusion of this program, or any part of it, in any form in a
commercial package, or its use for commercial purposes, requires the
written permission of the author.
Other Programs By HERMES:
PALETTA.ARC (Color Mixing, Modifying IFF's, Random Colors)
SIMPLIC1.ARC (The Simplex Method Of Linear Programming. This Is The
Demo Version Of The Commercial Product SIMPLICA. The
Complete Program Handles Simplexes Of Up To 30 Un-
knowns And Up To 30 Constraints. It Will Also Load
And Save Simplexes. The Best Simplex Program For
Your Amiga)
ROST.ARC (Reports On Storage And Tasks On Their Windows. Useful!)
LISTA11.ARC (Very Useful Directory Lister. Alpha, Bytes, Patterns,
CLI, Refresh. Opens Its Own Window)
SCRIPTA.ARC (Online!-PCP Script Maker. Easy Online! Script Files!)
FORMULA!.ARC (FORMIDABLE 3D-Grapher In C. It graphs z = f(x,y).
Choice Of Colors. 17 Functions Supported. An Artist's
Tool)
FINANCA.ARC (Mortgage, Compound Interest And Annuity In Color!)
CONTOURA.ARC (SPECTACULAR Contour Grapher. Definitely An Artist's
Tool. CENTER, ZOOM IN, ZOOM OUT, FLOWING PALETTE,
SCALING. An Important Artist's Tool!)
ARCHA11.ARC (ARC-PAK-ZOO Utility. It Also Has Another 12 Utility
Gadgets And 7 Drive Gadgets. Only 29K, It Can Be Used
As An Efficient Directory Utility)
DUHERM27.ARC (Beautiful Directory Utility. A Multitude Of Functions.
72 Gadgets Out Of Which 48 Are User-configurable!
One Of The Major Powerful DirUtils For The Amiga)
VIEWOVER.ARC (This Is The Program View (V. 1.8) With Overscan
Capability By HERMES. Very Small (About 6K) And Very
Convenient)
HERMIT.ARC (This Program Allows You To Save/Cycle Your Front Screen.
It resides In The Background And "Listens" To Your Key-
board For HOT KEYS. Nice And Only About 15K Long)
ICONLAB2.ARC (The Definitive Work On Icons For The Amiga Computer.
It Supports: CUT ICONS, ICON->BRUSH, BRUSH->ICON,
CUT->BRUSHES, 8-COLOR ICONS, SPLIT ICONS, JOIN ICONS,
MODIFYING OF ICON DATA, etc. This Is The Commercial
Demo Of The Commercial Program ICONLAB Available From
HERMES)
FOR SUPPORT, call HERMES BBS in Tampa, FL, USA. It is a
private bulletin board with 1600 files online and a healthy message base.
HERMES BBS Telephone No.: 813-985-7624 (2400, PC Pursuitable).