home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
science
/
prmath21.arj
/
PROMATH.DOC
< prev
next >
Wrap
Text File
|
1991-09-05
|
26KB
|
765 lines
ProMATHeus (c) 1991
The Formula Processor
Blarney Stone Software
2510 Blarney Stone Lane
Bloomington, IL 61704
A Guide to ProMATHeus (c) 1991
ProMATHeus is a copyrighted product designed to aid you in solving simple and
complicated calculations of all types. It was created by a professional
mathematician and actuary who was frustrated by the lack of affordable
calculation software which avoids the pitfalls of old-fashioned calculators (and
their PC-based mimics) and spreadsheets. ProMATHeus differs from calculator
software in that it works like you think--not the way mechanics require.
Further, it differs from spreadsheets in that it does not rely on their
cumbersome cell-address "logic". Features include:
- Named variables replacing the nondescript numbered memories of calculators,
- Formulas are entered easily, remembered, and interact with each other,
- Active formulas (i.e., those with variables) are reviewed constantly and
partial and/or full solutions are displayed,
- Formulas can contain functions and variables with known or unknown values,
- Many common functions (logarithmic, trigonometric, financial, statistical...)
are preprogrammed,
- Custom functions can be defined easily, call other functions, and simplify
calculations,
- Custom functions can be solved (by iteration) for any one of their variables,
- Libraries of custom functions can be created relating to any discipline:
mathematics, finance, engineering, statistics, surveying, navigation, etc.,
- One-variable custom functions can be plotted with the Graph feature,
- Entire work sessions (formulas, functions, and variables) can be saved and
retrieved easily,
- The current work session is saved automatically.
ProMATHeus is a powerful tool for users ranging from the beginning algebra
student to the advanced engineering or scientific professional. It shapes
easily to fit the computational needs of each individual.
Required Registration-----------------------------------------------------------
After extensive development, it is now being released under the shareware
concept. Shareware allows you, the user, the chance to try a product before you
buy it. If, after trying it, you would like to continue using ProMATHeus, you
must register your usage with a $15 donation sent to:
Mark D. Brissman
Blarney Stone Software
2510 Blarney Stone Lane
Bloomington, IL 61704
Registered users will receive a full printed instruction manual with examples
and formulas. The manual explores the richness of ProMATHeus and includes
hints for users of all levels and abilities. Registered users also receive
notices of future releases.
Registered users who donate $25 or more will receive ProMATHeus Plus. This
enhanced version contains a full complement of internal functions including:
solve Solves any function you have defined for any of its variables
using an iterative technique,
integrate Numerically integrates any continuous function you have
defined over a range,
differentiate Returns the numeric differential of an function you have
defined at a point,
logical True, false, and, or, not, two-variable comparisons,...
statistical Factorials, combinations, permutations, erf function, normal,
inverse normal, chi-square, t distribution, F distribution,
and gamma. (Noncentral parameters and inverses are included
for most functions.)
logarithmic Log (base 10), ln (base e), exponential, power,...
trigonometric Sin, cos, tan,..., sinh, cosh, tanh,...
financial Loans, annuities, effective yields,...
miscellaneous Integer part, fractional part, polar/rectangular conversion,
square root,...
Disclaimer of Liability-----------------------------------------------------
No warranty or representation is made, either expressed or implied, with
respect to this program or documentation, including their quality, perfor-
mance, merchantability, or fitness for a particular purpose.
Blarney Stone Software has tried to assure the accuracy of ProMATHeus.
However, because computer programs are inherently complex and may not be
completely free of errors, you are advised to verify your work.
Copyright-------------------------------------------------------------------
This product is distributed under the shareware concept. You are permitted
to copy and distribute this product to other potential users. All users
wishing to continue use of this product must pay for that right by register-
ing with the Author (as provided on the previous page). All registered users
may make backup copies.
Suggestions------------------------------------------------------------------
The Author of this program welcomes any comments and/or suggestions. Please
send all correspondence to the address given on the first page. If problems
occur, please make a note of any messages received, save your session to a
unique file, and make a backup copy of your "PROMATH.DAT" file. Include a
diskette containing these files with your correspondence.
Files shipped with ProMATHeus------------------------------------------------
PROMATH.EXE The ProMATHeus program.
PROMATH.DAT Contains the previous session (automatically saved).
FINANCE.DAT
STATS.DAT Two sample sessions provided with this program.
PROMATH.HLP Data used with the "help" key (F1).
PROMATH.DOC This file.
MONO.CLR
AZTEC.CLR
BLUESUIT.CLR
CNDYCANE.CLR Empty session files with various color schemes.
--------------------------------A Brief Tutorial-----------------------------
Starting---------------------------------------------------------------------
With the ProMATHeus disk in drive A:,
type : A:<enter>
Then type: promath<enter>
Upon entry, ProMATHeus calls the 'PROMATH.DAT' file which contains the
previous session which is saved each time automatically. If you enter
'promath filename', the previously saved session 'filename' will be loaded.
If you enter 'promath 0' ProMATHeus will not recall the previous session and
will start with a clear screen.
MONOCHROME USERS: Please type: 'promath mono.clr' to begin. The mono color set
should remain for all other sessions.
Saving and Recalling Sessions, Exiting---------------------------------------
Sessions can be saved and recalled using the 'save filename' and
'get filename' commands (see Appendix A) with file names of your choosing.
The 'exit' command will end ProMATHeus and save the current session to
PROMATH.DAT. 'nosave' will exit without saving.
The Screen-------------------------------------------------------------------
The screen consists of four main sections:
Formula window- This section takes up the entire screen and is always show-
ing. It includes a listing of all formulas.
Input window- This is the second line from the bottom. This window
automatically scrolls for long input.
Function window- This lists all user-defined functions.
Variable window- This lists all formula variables and their values. If
values are not determined, --unknown-- appears.
The function and variable windows are toggled on and off with the <Esc> key.
The formula, function, and variable windows (if sufficiently long) can be
scrolled with the up and down arrows. The Function window is scrolled if the
Variable window is not showing (i.e., by using the <esc> key to toggle) and
vice versa. The Formula window is scrolled in all other cases.
The formula and function windows may be scrolled horizontally using the <F4>
and <F5> keys.
The bottom left corner of the border provides information on memory usage.
Screen colors may be altered by using the clr..... commands of Appendix A.
Also, three sessions are supplied which have alternative color sets (file
extension CLR). NOTE: All data will be erased if these files are retrieved.
Several other commands are provided in Appendix A to alter the appearance and
performance of ProMATHeus.
Entering Formulas------------------------------------------------------------
Formulas can be entered in several forms. The simplest is a direct calcula-
tion such as:
(Input window)
??: 2+3
After pressing <enter> ProMATHeus responds:
(Formula window)
1| 2+3 --> 5
The ProMATHeus response consists of several parts:
(number)(indicator) (original expression) --> (reduced expression)
'Number' is used for copying and deleting formulas. As demonstrated later,
the 'indicator' identifies formulas which are evaluated once (|) from those
that will be re-evaluated continuously (). The 'reduced expression' is the
current value for the 'original expression' which you typed.
Mathematical operators, in order of precedence, are:
( ) (including functions)
^ (power)
* /
+ -
Given no other precedence, calculations are performed left to right. Thus:
(Formula window)
1| 2*3+5 --> 11
2| 2+3*5 --> 17
3| 2*(3+5) --> 16
4| 2^3*5 --> 40
5| 2^3^2 --> 64
6| 2^(3^2) --> 512
Numbers may be in scientific notation: [sign]##.##e[sign][exponent]
2.3
-2.3
2.3e5
-2.3e-12
Any number of parentheses may be used. The input line is limited to 200
characters. Longer equations should be split into sub-parts by using interim
variables.
Variable and Function Names--------------------------------------------------
Names must begin with an alpha character (a-z _ A-Z) and be followed by up to
nine alphanumeric characters (a-z _ A-Z 0-9). The constant PI or operational
commands (listed in Appendix A) cannot be used as names.
Variables--------------------------------------------------------------------
Formulas can contain variables in place of numbers. ProMATHeus evaluates as
much of the formula as it can and prints the result after the arrow:
(Formula window)
1 pennies+5*nickels --> pennies+5*nickels if pennies & nickels are both
unknown, or,
1 pennies+5*nickels --> 7+5*nickels if pennies is known and
equals 7, or,
1 pennies+5*nickels --> pennies+15 if nickels is known and
equals 3, or,
1 pennies+5*nickels --> 22 if both variables are known.
Note the symbols next to the formula numbers are instead of |. signifies
"active" formulas with variables which will be recalculated with each press
of the <enter> key. | signifies "inactive" formulas without variables which
are calculated only once.
The Variables window keeps track of all variables and their values, if known.
The simplest way for a variable to become "known" is through an assignment
expression as shown in the Input Window below. Simple assignments like this
do not become formulas--they simply update the value of the variable in-
volved. Variables also become "known" through assignment formulas like
formulas 2 and 3 below. Note that variables assigned to a constant expres-
sion (formula 2) are evaluated only once (i.e., '|' is the indicator). Since
the Input Window reassigns "pennies" to equal 9, this value is used for
"pennies" in formula 1 (which is active) and formula 2 (which is inactive) is
ignored.
(Formula window)
1 pennies+5*nickels --> 9+5*nickels
2| pennies=10-3 --> pennies=7
3 rabbits=5*carrots+6 --> 5*carrots+6
(Input window)
pennies=9
A variable retains its value until it is changed by another assignment
expression (as in the Input window above), changed by a current assignment
expression (like #3), or set to --unknown-- by the "clear" command (see
Appendix A). A variable cannot be "clear"ed if it is defined by an active
assignment expression (like #3). However the variable (e.g., "rabbits") will
automatically be set to --unknown-- if any of the assignment expression
variables (e.g., "carrots") are --unknown--.
The constant PI may be used. It represents 3.14159265358979.
The "copy #" command copies formula # into the Input window to be edited and
produce a new formula. The original formula # is not changed. If the
original and copied formulas are both active and define the same dependent
variable, then the first formula is in effect until deleted.
Functions-------------------------------------------------------------------
Functions can be included in formulas and can either refer to internal
ProMATHeus functions or ones which you have created. Internal functions are
listed by pressing the <F2> key. To use them, simply enter them in your
formulas in the correct format. For example:
(Formula window)
1 x=log(2) --> x=.301029995663981
You may input any valid expression (including variables and other functions)
into a function. Thus, the following are valid:
(Formula window)
1 y=log(2+z) --> y=1.39794000867204
2| z=19+4
or
1| log(log(12)+3*log(13)) --> .645521625245258
Notes on Certain Internal Functions-----------------------------------------
1. Trigonometric functions use and return angles measured in radians. To
convert from degrees to radians use the "rad" function. To convert from
radians to degrees use the "deg" function. Thus, to get the cosine of
PI/3 radians enter "cos(PI/3)". To get the cosine of 60 degrees (which
equals PI/3 radians) enter "cos(rad(60))".
2. The "pmt" function returns the required payment. It requires the loan
amount, interest rate, and number of periods. The interest rate must be
the decimal equivalent of the interest rate per period. Thus 10.2%
annually with monthly payments requires either a 10.2/1200 or a .0085
entry.
3. The "int" function returns the integer portion of a number. The "abs"
function returns the absolute value of a number.
4. The norm(x,mean,stdev) and inorm(z,mean,stdev) functions are the normal
and inverse normal distributions respectively such that:
'x' is an observed value,
'X' is the unknown true value, and,
'z' is the probability that the X < x given the observed mean and
standard deviation.
Thus: z = norm(x,mean,stdev), and,
x = inorm(z,mean,stdev).
The erf(x) function is the statistical error function.
Custom Functions------------------------------------------------------------
Customs functions are created by naming the function, listing the function
variables, and assigning a valid arithmetic expression. For example:
(Function window)
1: f(x)=x*x-3
2: g(q)=2*q+3
3: fire(fuel,heat)=f(fuel)*3-g(4+heat)
The function definition must be of the following form:
(function name)(function variable list)=(valid equation using function
variables only)
The function name must be of the form defined previously. The function
variable list may include an list of up to ten function variables and is of
the form:
(var1,var2,var3,...)
These variables are used for the function definition only and are not
retained as regular variables of ProMATHeus. All function variables in the
equation to the right of the equal sign must be in the function variable
list. Any functions called by a function must have been already defined.
With the above functions:
(Formula window)
1 fire(5,3) --> 49
If all function variables are known, a function will return the calculated
value, otherwise the function is not evaluated. Thus if a value for "cement"
is supplied but not for "gravel":
(Function window)
1: concrete(cement,gravel)=cement*3+gravel*2
(Formula window)
1 concrete(cmnt,rocks) --> concrete(15,rocks)
2| cmnt=15
Functions may be changed by using the "fcopy #" command (see Appendix A)
which copies function # to the Input window for editing. Note that even
though a function is changed, values of function calls in inactive formulas
(|) do not change.
Although presented only briefly, custom functions are one of ProMATHeus's
most important features.
Solving Functions------------------------------------------------------------
The solve operation allows you to solve any custom function for any one of
its function variables, given:
1. Supplied values for its other function variables,
2. The desired value which the function would normally return, and,
3. A starting guess of the function variable which is being solved for.
It uses an iterative technique (Newton-Raphson) which may or may not con-
verge. Convergence and the solution achieved are aided by a good starting
guess for the value. Assume a defined function 'f' which returns the value
'a':
a = f(...,b,c,d,...) [i.e., any number of parameters]
If all other function variables are known (including 'b' and 'd'), then an
estimate of 'c' would be entered as:
estimate of c = f(...,b,{desired a , guess of c},d,...).
That is, the value of 'c' is replaced by two numbers in braces--the desired
outcome and a first guess.
Thus if f(t)=t*t+t,
then f(3) --> 12,
and f({12,1}) --> 3.
If difficulties are encountered, try different starting guesses for the
value. Also, by entering "solvedif #", the difference used in the iteration
process (specifically, the derivative calculation) will be set to '#'
(default: 1e-10). Further, by entering "iterations #" the maximum number of
iterations used to solve the function will be set to "#" (default: 100).
Graphing Functions----------------------------------------------------------
One variable custom-functions are graphed using the following command:
graph fn# begx endx begy endy
"fn#" is the number assigned to the custom function in the function
window.
"begx" and "endx" are required and define the x-axis.
"begy" and "endy" are optional and define the y-axis. If omitted, the
entire screen is used for the graph. If both are zeros, the y-axis will
be of the same unit size as the x-axis (i.e., square) and centered in the
graph.
Pressing "Z" or "z" zoom the graph in and out. Pressing <enter> returns
to main ProMATHeus windows.
Note: Two commands control video graphics mode (graphon #) and video text
mode (graphoff #). These are generally set at zero which is the automatic
mode. Some computers will require different modes. For example, some VGA
monitors require that "graphoff" be set to 768. Appendix B may provide some
assistance in this regard. If you have difficulties, register users may
contact Blarney Stone Software.
Formula, Function, and Variable Order---------------------------------------
ProMATHeus was designed to balance speed, memory usage, and ease of use. If
the same variable is defined twice, the result is order dependent in the
following manner:
If the first assignment was in a inactive formula--the latter assignment
of the same variable supersedes the first.
Otherwise, the second assignment is ignored until the first is deleted.
Formulas are listed and numbered in order of their entry. For speed, it is
more efficient to not restrict functions and variables to any order. Thus,
they are placed in the first available space in their lists. In fact,
deleted function numbers (using "fdel") are only replaced when new functions
are entered.
Circularity------------------------------------------------------------------
Circularity occurs when a formula or function calls itself, possibly through
a long chain. ProMATHeus does not allow circularity within functions as it
would cause an infinite loop. Formulas are allowed to be circular as it
might be required temporarily with some editing tasks. Generally, ProMATHeus
will return no values for any formulas which contain circularity. In most
cases, you would want to delete formulas which create circularity.
Error Messages---------------------------------------------------------------
ProMATHeus displays a number of error messages. Calculation errors are
indicated in the "reduced expression" portion of a formula listing. Opera-
tional error messages are listed at the bottom of the screen and begin with
two numbers: the first is an internal code for Blarney Stone Software's use
and the second identifies, if possible, the formula where the error occurred.
ProMATHeus detects many input errors and makes you correct them before
proceeding.
Sample Sessions--------------------------------------------------------------
FINANCE.DAT and STATS.DAT are provided as short examples of the power of
ProMATHeus's custom functions. The first shows the development of the
binomial and poisson distributions. The second includes loan analysis
functions. You may retrieve them using the 'get' command described previous-
ly.
Appendix A
Operational Commands
The following commands may also be entered at the ??: prompt:
restart Erase all functions, variables, and formulas.
quit Save the current session to automatic file and end
ProMATHeus.
save <filename> Save current session to <filename>. <filename> must be a
valid DOS file name and may include a path.
nosave Quit ProMATHeus without updating the automatic file.
get <filename> Retrieve a session from <filename>. <filename> must be a
valid DOS file name and may include a path.
del # #-# # Delete a list or range of equations: "del 1 5-8 10" would
delete equations 1, 5, 6, 7, 8, and 10.
fdel # # # Delete a list of functions. Only functions which are not
included in any formula are deleted.
clear var var
erase var var Clear or erase a list of variables. Only variables which
are not included in any formula are affected. If no
variable list is given, all possible variables are af-
fected.
<esc> Toggles Function and Variable display windows.
<up>, <down> Scrolls the active window up or down.
<F4>, <F5> Scrolls the active window left or right.
The active window is the Function window if the Variable
window is not showing, and vice versa. The active window
is the Formula window in all other cases.
<F1> Help window.
<F2> Displays the internal functions window.
<F3> Displays system operation parameters.
<F10> Print analysis report.
copy # Copies formula # for editing and creation of a new formu-
la. The original formula # is not changed. If both
formulas define the same dependent variable, the first
usually needs to be deleted.
fcopy # Copies function # for editing. If the function name
remains the same, the old function is replaced. Other-
wise, a new function is created.
clr....f # Changes foreground color to #. # may be 0 to 15.
clr....b # Changes background color to #. # may be 0 to 7.
'....' is replaced with 'form' (formula window), 'func'
(function window), 'vari' (variable window), 'inpu'
(input line), or 'mess' (message windows).
clrboard # Changes boarder color to #. # may be 0 to 15.
graphon # Sets the graphics mode to # (0 = automatic).
graphoff # Sets the text mode to # (0 = automatic).
iterations # Sets the maximum number of iterations to # for custom
function 'Solve'.
solvedif # Sets the incremental difference used to calculate the
derivative for the 'Solve' command.
fix # Sets the numeric format to FIXED with # decimals.
sci # Sets the numeric format to SCIENTIFIC with # decimals.
Appendix B
Screen Modes
If the default automatic modes of 0 do not produce desired results when
graphing, you may want to experiment with other screen modes. This might
require a value which is the sum of the appropriate factors below.
Display Card
mono 1 256
color 2 512
EGA 4 1024
VGA 8 2048
Hercules 4096
Modes---------------------
Bl/Wt 40 text 32768
Color 40 text 32769 or 256
Bl/Wt 80 text 32770 or 512
Color 80 text 32769 or 768
Graphics 32770 or 1024
Med res color 32770 or 1024
Med res Bl/Wt 32771 or 1280
High res Bl/Wt 32772 or 1536
Mono text 32773 or 1792
Hercules text 32774 or 2048
Hercules GFX 32775 or 2304
EGA med res 32781 or 3328
EGA high res 32782 or 3584
EGA mono 32783 or 3840
EGA color 32784 or 4096
VGA mono 32785 or 4352
VGA color 32786 or 4608