home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 31
/
CDASC_31_1996_juillet_aout.iso
/
vrac
/
tsnum13.zip
/
TSNUM.INF
< prev
next >
Wrap
Text File
|
1996-03-15
|
8KB
|
218 lines
- 1 -
Fri 15-March-1996
About TSNUM in General All rights reserved
======================
This package may be used and distributed freely for NON-COMMERCIAL,
NON-INSTITUTIONAL, PRIVATE purposes, provided it is not changed in
any way. (Repacking with another method is ok, though.) For ANY
other usage, such as use in a business enterprise or a university,
contact the author for registration. Uploading to bulletin boards is
encouraged. Please do not distribute any part of this package
separately.
The programs are under development. If you have any comments or bug
reports, please do not hesitate to use electronic mail for
communication.
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 (email: ts@uwasa.fi WWW: http://uwasa.fi/~ts/)
Professor of Accounting and Business Finance
Faculty of Accounting & Industrial Management
University of Vaasa
P.O. BOX 700, FIN-65101 Vaasa, Finland
CONTENTS:
1. Summary
2. Common Features
3. Individual Program Abstracts
4. Release Notes
1. SUMMARY
=======
TSNUM13 Numerical Analysis by Timo Salmi
Filename Comment
-------- --------------------------------
BISE.EXE Solves f(x)=0, Bisection Method
EQ2.EXE Solve linear equations of 2 vars
FILE_ID.DIZ Brief characterization of tsnum
IC.EXE Line's intercepts with the axes
LINE.EXE Equation of line thru two points
POLYR.EXE All roots of a polynomial
SECA.EXE Solves f(x)=0, Secant Method
SINTEG.EXE Integrates f(x), Simpson's rule
TSNUM.INF Document and a readme
TSNUM.NWS News announcements about tsnum
TSPROG.INF List of PD programs from T.Salmi
VAASA.INF Info: Finland, Vaasa, U of Vaasa
---- ------ ------ -----
0012
- 2 -
2. COMMON FEATURES
===============
The TSNUM programs are for numerical analysis.
The general format of the calls to programs involving functions is
PROGRAM {function} [the parameters]
e.g. SECA x^2-7*x+5 1.0
│ └─a parameter
└─the function
No blanks are allowed in a function. The variable must be denoted by
the letter x (case-independent).
To get more information about an individual program use ? in the
program call: e.g. SECA ?
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.
For the theory and methods of numerical analysis see any good
text-book on numerical analysis. Also many programming text-books
give useful information on the subject.
3. INDIVIDUAL PROGRAM ABSTRACTS
============================
BISE.EXE (Ver. 1.1a) Solves f(x)=0, Bisection Method
====================
The program uses the bisection method for finding a root of f(x) = 0
between the initial values. To find the suitable initial values,
first draw the function, e.g. with FNP.EXE, and/or tabulate it with
FNT.EXE. They both are available in
ftp://garbo.uwasa.fi/pc/ts/tsfunc13.zip
Calculates, tabulates, and plots your functions
Usage: BISE f(x) {initial value left} {initial value right} [decimals]
e.g. BISE x^2-7*x+5 0 5 5
The parameters in the brackets [] are optional.
By giving -1 as [decimals] you get the exponential representation.
- 3 -
EQ2.EXE (Ver. 1.1a) Solve linear equations of 2 vars
===================
The program solves simultaneous equations of two variables.
a1*x1 + b1*x2 = c1 e.g. 5X1 + 5X2 = 400
a2*x1 + b2*x2 = c2 200X1 + 300X2 = 2100
Usage: EQ2 a1 b1 c1 a2 b2 c2 [decimals]
e.g. EQ2 5 5 400 200 300 2100 5
The parameter in the brackets [] are optional.
By giving -1 as [decimals] you get the exponential representation.
------------------------------------------------------------------------------
IC (Ver. 1.1) Line's intercepts with the axes
=============
The program solves the intercepts of a line with the axes.
Usage: IC a b c [decimals]
e.g. IC 200 300 2100 5
------------------------------------------------------------------------------
LINE.EXE (Ver. 1.1a) Equation of line thru two points
====================
Calculates the equation of a line passing through two given points.
The equation of the line will be given in two different formats:
1) Y = a + bX
2) aX + bX = c
If the latter contains fractional coefficients, the program will
attempt to find an equivalent equation with integer coefficients.
Usage: LINE x1 y1 x2 y2 [number of decimals]
or: LINE ?
By giving -1 as the optional [number of decimals] parameter you get
the exponential representation.
------------------------------------------------------------------------------
POLYR.EXE (Ver. 1.0a) All roots of a polynomial
=====================
Usage: POLYR a(0) a(1) a(2) ... a(N)
To solve a(0) + a(1)X + a(2)X^2 + ... + a(N)X^N = 0
or: POLYR ?
This programs solves all the roots of a polynomial of the Nth
degree. The algorithm is Laguerre's method as presented in Turbo
Pascal 4.0 numerical toolbox by Borland International Inc. It is
used in accordance with Borland's no-nonsense licence statement.
------------------------------------------------------------------------------
- 4 -
SECA.EXE (Ver. 1.1a) Solves f(x)=0, Secant Method
====================
The program uses the secant method for finding a root of f(x) = 0
near the initial value. To find a suitable initial value, first draw
the function, e.g. with FNP.EXE, and/or tabulate it with FNT.EXE.
They both are available in TSFUNCxx.ZIP. This is particularly useful
if the function has several roots.
Usage: SECA f(x) [initial value] [decimals]
e.g. SECA x^2-7*x+5 1.0 5
------------------------------------------------------------------------------
SINTEG.EXE (Ver. 1.1a) Integrates f(x), Simpson's rule
======================
⌠a
The program uses Simpson's method for evaluating the definite integral │ f(x)
⌡b
Usage: SINTEG f(x) {lower bound} {upper bound} [intervals] [decimals]
e.g. SINTEG x+ln(x) 1 2.7182818 100 5
------------------------------------------------------------------------------
4. RELEASE NOTES
=============
Since versions 1.1 the programs recognize e.g. .1 as 0.1. Earlier
using a decimal value without the leading zero caused an error. This
resulted from the way Turbo Pascal converts strings into numerical
values. Version 1.2 of the package introduces the POLYR.EXE program.
For later release notes please see TSNUM.NWS.