home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 52
/
Amiga_Dream_52.iso
/
Amiga
/
Applications
/
Mathematiques
/
RPN.lha
/
RPN
/
READ.ME
< prev
next >
Wrap
Text File
|
1991-08-26
|
7KB
|
181 lines
RPN V1.00 900131 - Release notes
by MLO
Excuse my bad english, folks ...
RPN is a computer program that simulates, on the AMIGA screen,
an Hewlett-Packard pocket computer. A first version of
RPN
was written
several years ago in FORTRAN for an HP21MX mini computer, then moved
to a VAX; a BASIC version for IBM PC's was also written. Now
RPN
is
translated in C (the better human creation after italian people) for
Commodore Amiga; the compiler is Lattice C V5.04, and the original
environment an Amiga 500 with 2.5 MBytes of Fast Ram, but the program
must run on every configuration and should (with minimal changes) be
compiled and linked using Manx's Aztec-C.
The source files, the objects, and the
MAKEFILE
used to compile
and link
RPN
are included: you are welcome to modify the source, if
you will find some error (although tested, this program could contain
errors - this is human) or if you do not like the aesthetics. But,
please, send me your changes at the address that you will find at the
end of this
Read.Me
file.
The simulated pocket computer was originally an HP-32, then
some features of HP-11C were also included; I assume that you are
familiar with these pocket computer families, or at least with the
Reverse Polish Notation (RPN) logic they use:
RPN
was introduced by
Lukasiewicz in 1924, and is based over the statement
"every function
must be introduced immediately after the variables that are its
arguments". All pocket computers use this logic for functions of a
single argument, e.g. the square root: you type the number, then you
select the "square root" function.
RPN computers use the same logic for
all
functions, the four
basic arithmetic operations included; in this way you do not need a
key to start the computation (the "=" key), you do not need
parenthesis, and you can inspect, access and modify every intermediate
result.
RPN
has a four registers stack, and sixteen memory registers:
six of them, from
A
to
F,
are used for temporary storage in
statistical computations; but you can use all of them to store your
temporary results. Stack and registers are always visible in a
dedicate window.
To start
RPN
simply type
RPN
from CLI; or double-click over the
RPN
icon (beware: real men do not use icons). You should obtain a main
window with key gadgets to be selected using the mouse, and a string
gadget (the
Input Field - IF
); and a secondary window showing the
values stored in the stack and in the sixteen registers. You can use
also pull-down menus to perform some operations.
To input numerical values, select the
IF
gadget - or type a
character that is suitable for numerical input, both in fixed point
notation or in scientific notation, and the
IF
gadget will be selected
for you. You can modify what you typed, because the
IF
will be read
only when you deselect this string gadget (hitting the RETURN key; the
value will be stored in the
X
register) or selecting a key gadget or a
menu option (the numeric value will be stored in the
X
register and
then the function you required will be performed on it).
Every
operation is tested against arithmetical errors, and the
stack or the registers will be modified
only
if no error is detected;
if you by mistake select a wrong, but legal, operation, you can
- 1 -
recover the stack and registers status selecting the
Last X
menu
option and then the inverse of the last function.You can with
RPN
perform:
- The four basic arithmetic operations.
- Inverse, square root, square, powers, percentage.
- Exponential and logarithmic functions, both natural and
decimal.
- Trigonometric or hyperbolic sine, cosine and tangent and their
inverse functions.
- Convert angles to radians, sexagesimal and centesimal degrees;
convert numbers from decimal to sexagesimal system, or the
inverse; convert coordinates from rectangular to polar, or the
inverse.
- Statistical computations: mean, standard deviation, linear
correlation coefficient, linear regression, coordinates of
points on the linear regression line, errors on the ordinates
with the Fisher's formula.
- Direct arithmetic operations on memory registers.
For trigonometric functions, you can select angle measurements
in radians or degrees, both sexagesimal or centesimal; all
computations are performed in double precision (64 bits). The
Inv
key
must
be followed by
Sin/Cos/Tan
and indicates their inverse function;
Hyp
introduces the hyperbolic functions, and
Inv Hyp,
or
Hyp Inv,
their inverse.Reminder:
- The % key computes in
X
the
X
percentage of
Y.
- The sequences
Recall "Operation" Register
perform an
Enter,
then show in
X
the result of
X "Operation" Register.
- The sequences
Store "Operation" Register
store in
Register
the
result of
Register "Operation" X.
- For the mean and the standard deviation: after hitting the
Mean
key you will find the mean in
X
and the standard deviation in
Y.
- Hitting the
L.R.
key, the linear regression line
A+Bx
is
computed; you will find
A
in the
X
register, and
B
in
Y.
The
memory registers
A..F
contain:
A
Number of points
B
Sum of x values
C
Sum of the squares of the x's
D
Sum of the y's
E
Sum of the squares of the y's
F
Sum of the products x times y
- Polar coordinates: the radius is in
X
and the azimuth angle in
Y
.
- 2 -
About the author: please notify all modifications to:
Maurizio LORETI (or MLO, or I3NOO)
Via G. Donizetti, 6
35010 CADONEGHE (PD)
ITALY
Also reachable with E-Mail at the address you will find in the
source headers.
LORETI at IPDINFN (BITNET)
Have fun!
MLO
- 3 -