home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / math / tsnum12.arc / TSNUM.INF < prev    next >
Encoding:
Text File  |  1989-06-01  |  8.0 KB  |  200 lines

  1.                                   - 1 -
  2. 13th January, 1989
  3.  
  4. About TSNUM in General
  5. ======================
  6.  
  7. This package may be used and distributed freely for NON-COMMERCIAL,
  8. NON-INSTITUTIONAL, PRIVATE purposes, provided it is not changed in any way.
  9. For ANY other usage contact the author. No part of this package may be
  10. distributed separately.
  11.  
  12. The programs are under development. Comments and contacts are welcome. If you
  13. have any comments, please do not hesitate to use electronic mail for
  14. communication.
  15. InterNet address: ts@chyde.uwasa.fi         (preferred)
  16. Funet address:    VAKK::SALMI
  17. Bitnet address:   SALMI@FINFUN
  18. FidoNet address:  2:515/1 (Micro Maniacs Opus, To: Timo Salmi)
  19.  
  20. The author shall not be liable to the user for any direct, indirect or
  21. consequential loss arising from the use of, or inability to use, any program
  22. or file howsoever caused. No warranty is given that the programs will work
  23. under all circumstances.
  24.  
  25. Timo Salmi
  26. Professor of Accounting and Business Finance
  27. School of Business Studies, University of Vaasa
  28. P.O. BOX 297, SF-65101 Vaasa, Finland
  29.  
  30. CONTENTS:
  31.  
  32.   1. Summary
  33.   2. Common Features
  34.   3. Individual Program Abstracts
  35.   4. Release Notes
  36.  
  37.  
  38. 1. SUMMARY
  39.    =======
  40.  
  41. Searching Archive: B:TSNUM12.ARC - Numerical Analysis by Timo Salmi
  42.  
  43. Filename        Comment                             Date      Time
  44. --------        --------------------------------    ----      ----
  45. BISE.EXE        Solves f(x)=0, Bisection Method   11-03-88  21:01:26
  46. EQ2.EXE         Solve linear equations of 2 vars  11-02-88  23:28:46
  47. IC.EXE          Line's intercepts with the axes   11-03-88  21:04:08
  48. LINE.EXE        Equation of line thru two points  11-03-88  21:07:20
  49. POLYR.EXE       All roots of a polynomial         01-14-89  00:15:58
  50. SECA.EXE        Solves f(x)=0, Secant Method      11-03-88  21:08:40
  51. SINTEG.EXE      Integrates f(x), Simpson's rule   11-03-88  21:11:20
  52. TSNUM.INF       Document                          01-13-89
  53. TSPROG.INF      List of PD programs from T.Salmi  12-19-88  14:32:02
  54.  
  55.                                   - 2 -
  56.  
  57.  
  58. 2. COMMON FEATURES
  59.    ===============
  60.  
  61. The TSNUM programs are for numerical analysis.
  62.  
  63. The general format of the calls to programs involving functions is
  64. PROGRAM {function} [the parameters]
  65. e.g. SECA x^2-7*x+5 1.0
  66.              │       └─a parameter
  67.              └─the function
  68.  
  69. No blanks are allowed in a function. The variable must be denoted by the
  70. letter x (case-independent).
  71.  
  72. To get more information about an individual program use ? in the program call:
  73. e.g. SECA ?
  74.  
  75. The operators available are + - * / ^ ( )
  76. The functions available are
  77.  abs()      Absolute value         arctan()   Arctangent
  78.  cos()      Cosine                 deg()      Radians to degrees
  79.  ep()       Exponentation          fact()     Factorial
  80.  frac()     Extract decimals       int()      Delete decimals
  81.  ln()       Natural logarithm      log()      Base 10 logarithm
  82.  pi()       The value of Pi        rad()      Degrees to radians
  83.  rnd()      Random value           sin()      Sine
  84.  sqrt()     Square root
  85.  
  86. Many of the potential errors are trapped and pinpointed by the programs.
  87. Still, if you get the message  Runtime error 205 at xxxx:xxxx  it means that
  88. your formula has caused a floating overflow or underflow, or is otherwise
  89. invalid.
  90.  
  91. For the theory and methods of numerical analysis see any good text-book on
  92. numerical analysis. Also many programming text-books give useful information
  93. on the subject.
  94.  
  95.  
  96. 3. INDIVIDUAL PROGRAM ABSTRACTS
  97.    ============================
  98.  
  99. BISE.EXE (ver. 1.1)
  100.  
  101. The program uses the bisection method for finding a root of f(x) = 0 between
  102. the initial values. To find the suitable initial values, first draw the
  103. function, e.g. with FNP.EXE, and/or tabulate it with FNT.EXE. They both are
  104. available in TSFUNCxx.ARC.
  105.  
  106. Usage: BISE f(x) {initial value left} {initial value right} [decimals]      
  107.   e.g. BISE x^2-7*x+5 0 5 5                                                 
  108.                                                                             
  109. The parameters in the brackets [] are optional.                             
  110. By giving -1 as [decimals] you get the exponential representation.          
  111.  
  112.                                   - 3 -
  113.  
  114.  
  115. EQ2.EXE (Ver. 1.1)
  116.  
  117. The program solves simultaneous equations of two variables.
  118.   a1*x1 + b1*x2 = c1         e.g.    5X1 +   5X2 =  400            
  119.   a2*x1 + b2*x2 = c2               200X1 + 300X2 = 2100            
  120.  
  121. Usage: EQ2 a1 b1 c1 a2 b2 c2 [decimals]                            
  122.   e.g. EQ2 5 5 400 200 300 2100 5                                  
  123.  
  124. The parameter in the brackets [] are optional.                     
  125. By giving -1 as [decimals] you get the exponential representation. 
  126. ------------------------------------------------------------------------------
  127.  
  128.  
  129. IC (Ver. 1.1)
  130.  
  131. The program solves the incercepts of a line with the axes.
  132.                                                           
  133. Usage: IC a b c [decimals]                                
  134.   e.g. IC 200 300 2100 5                                  
  135. ------------------------------------------------------------------------------
  136.  
  137.  
  138. LINE.EXE (Ver. 1.1)
  139.  
  140. Calculates the equation of a line passing through two given points.
  141.  
  142. The equation of the line will be given in two different formats:
  143.  1) Y = a + bX
  144.  2) aX + bX = c
  145. If the latter contains fractional coefficients, the program will attempt to
  146. find an equivalent equation with integer coefficients.
  147.  
  148. Usage: LINE x1 y1 x2 y2 [number of decimals]
  149.    or: LINE ?
  150.  
  151. By giving -1 as the optional [number of decimals] parameter you get the
  152. exponential representation.
  153. ------------------------------------------------------------------------------
  154.  
  155.  
  156. POLYR.EXE: POLYnomial Roots, (Ver. 1.0)
  157.                                                                       
  158. Usage: POLYR a(0) a(1) a(2) ... a(N)                                         
  159. To solve a(0) + a(1)X + a(2)X^2 + ... + a(N)X^N = 0                          
  160.    or: POLYR ?                                                               
  161.                                                                              
  162. This programs solves all the roots of a polynomial of the Nth degree. The    
  163. algorithm is Laguerre's method as presented in Turbo Pascal 4.0 numerical    
  164. toolbox by Borland International Inc. It is used in accordance with Borland's
  165. no-nonsense licence statement.                                               
  166. ------------------------------------------------------------------------------
  167.  
  168.                                   - 4 -
  169.  
  170.  
  171. SECA.EXE (Ver. 1.1)
  172.  
  173. The program uses the secant method for finding a root of f(x) = 0 near the
  174. initial value. To find a suitable initial value, first draw the function, e.g.
  175. with FNP.EXE, and/or tabulate it with FNT.EXE. They both are available in
  176. TSFUNCxx.ARC. This is particularly useful if the function has several roots.
  177.  
  178. Usage: SECA f(x) [initial value] [decimals]
  179.   e.g. SECA x^2-7*x+5 1.0 5                                                
  180. ------------------------------------------------------------------------------
  181.  
  182.  
  183. SINTEG.EXE (Ver, 1.1)
  184.                                                                        ⌠a
  185. The program uses Simpson's method for evaluating the definite integral │ f(x)
  186.                                                                        ⌡b     
  187.                                                                               
  188. Usage: SINTEG f(x) {lower bound} {upper bound} [intervals] [decimals]         
  189.   e.g. SINTEG x+ln(x) 1 2.7182818 100 5                                       
  190. ------------------------------------------------------------------------------
  191.  
  192.  
  193. 4. RELEASE NOTES
  194.    =============
  195.  
  196. Since versions 1.1 the programs recognize e.g. .1 as 0.1. Earlier using a
  197. decimal value without the leading zero caused an error. This resulted from
  198. the way Turbo Pascal converts strings into numerical values. Version 1.2
  199. of the package introduces the POLYR.EXE program.
  200.