home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
calcultr
/
tsfunc13.arc
/
TSFUNC.INF
< prev
next >
Wrap
Text File
|
1988-12-27
|
5KB
|
142 lines
- 1 -
27th December, 1988
About TSFUNCxx.xxx in General
=============================
This package may be used and distributed freely for NON-COMMERCIAL,
NON-INSTITUTIONAL, PRIVATE purposes, provided it is not changed in any way.
No part of this package may be distributed separately. No charge for the
programs is allowed without an explicit consent of the author.
The programs are under development. Comments and contacts are welcome. If
you have any comments, please do not hesitate to use electronic mail for
communication.
Funet address: VAKK::SALMI
Internet address: SALMI@VAKK.UWASA.FI
Bitnet address: SALMI@FINFUN
FidoNet address: 2:515/1 (Micro Maniacs Opus, To: Timo Salmi)
The author shall not be liable to the user for any direct, indirect or
consequential loss arising from the use of, or inability to use, any program
or file howsoever caused. No warranty is given that the programs will work
under all circumstances.
Timo Salmi
Professor of Accounting and Business Finance
School of Business Studies, University of Vaasa
P.O. BOX 297, SF-65101 Vaasa, Finland
CONTENTS:
1. Summary
2. Common Features
3. Individual Program Abstracts
4. Release Notes
1. SUMMARY
TSFUNC13 - Plot/calculate functions T.Salmi
Filename Comment Date Time
-------- -------------------------------- ---- ----
FN.EXE Calculator (evaluates functions) 12-20-88 07:40:16
FNP.EXE Plots any function 12-20-88 07:43:28
FNT.EXE Tabulates user's function 12-20-88 07:46:34
TSFUNC.INF Document 12-20-88 07:53:26
TSPROG.INF List of PD programs from T.Salmi 12-19-88 14:32:02
- 2 -
2. Common Features
The TSFUNC programs are for evaluating expressions, for tabulating function
values, and for plotting functions (in the graphics mode).
The general format of the program call is
FNx {expression or function} [the parameters]
e.g. FN 23.4+11.5/2.3
or FNT 0.01*x^1.5 -1
│ └─a parameter
└─the function
No blanks are allowed in the expression or function. In a function, the
variable must be denoted by the letter x (case-independent).
To get more information about an individual program at run-time, use ? in the
program call: e.g. FNP ?
The operators available are + - * / ^ ( )
The functions available are
abs() Absolute value arctan() Arctangent
cos() Cosine deg() Radians to degrees
ep() Exponentation fact() Factorial
frac() Extract decimals int() Delete decimals
ln() Natural logarithm log() Base 10 logarithm
pi() The value of Pi rad() Degrees to radians
rnd() Random value sin() Sine
sqrt() Square root
Many of the potential errors are trapped and pinpointed by the programs. Still,
if you get the message Runtime error 205 at xxxx:xxxx it means that your
formula has caused a floating overflow or underflow, or is otherwise invalid.
3. INDIVIDUAL PROGRAM ABSTRACTS
FN FuNction evaluator, (Ver. 1.2)
=================================
Usage: FN expression [decimals]
e.g. FN 3^2+5.5*sin(rad(90/2))-ln(2) 5
Some invalid values: .6 3. -2^2.5 (see release notes)
Some valid values : 0.6 3.5 -(2^2.5)
The parameter [decimals] is optional. If you omit it, FN selects the output
format. By giving -1 as [decimals] you get the exponential representation.
FN owes much to the brilliant recursive formula evaluation algorithm in
Stephen K. O'Brien, Turbo Pascal, The Complete Reference. However, the
user interface, validity checks of the formula, and many of the functions
are entirely due to the present author.
- 3 -
FNT FuNction Table, (Ver. 1.2)
==============================
Usage: FNT expression [first x-value] [last x-value] [increment] [decimals]
e.g. FNT x^2+5.5*sin(rad(x/2))-ln(x+2) 0.0 10.0 1.0 5
The parameters in the brackets [] are optional.
By giving -1 as [decimals] you get the exponential representation.
FNP FuNction Plotter, (Ver. 1.2)
================================
FNP expression {from x-value} {to x-value} [increment][max x-axis][max y-axis]
e.g. FNP 30-0.1*(x-5)^2 -20 30 1.0 75 50
The parameters {from x-value} and {to x-value} are compulsory while
[increment] [max x-axis] and [max y-axis] are optional with defaults
1.0, 75, and 50. If given, the optional parameters must be positive.
The upper left-hand corner of the graphical display gives the plotted
expression. The lower right-hand corner gives the scale of the figure
by displaying the distance between the notches in the axes.
4. RELEASE NOTES
The versions 1.1 of all the programs add a leading zero to the formula
if this starts with a minus sign. (E.g. -x^2-4*x+3 would be converted into
0-x^2-4*x+3.) This is necessary in order to avoid ambiguity in the recursive
function evaluation algorithm in cases of powers of negative values.
The versions of 1.2 of all the programs no longer require a zero before
the decimal point. Thus e.g. .2 is now valid for 0.2.
The versions 1.3 have been recompiled with Turbo Pascal 5.0.