Numeric Library / General Information
Omikron Basic on the Internet: http://www.berkhan.de
1. General Information
1.1 System Requirements 1.2 Installation 1.3 Copyright 1.4 Hotline, Reporting Errors/Bugs, and Suggestions 1.5 Information about Using the Library
|Numerical methods are used and required by many natural science and technical applications. Numerical
methods are often the fastest and most practical way to solve pending problems, especially if it concerns finding
solutions for differential equations or very extensive systems of equations, for example, in case of evaluating
The Numeric Library saves you the search for the appropriate equations and having to create the calculation algorithms. Thus, this Library offers functions and procedures for many important areas of numerical mathematics. Care was taken to select a basic configuration of important and proven procedures, which can be employed by most of the users.
This means that next to additional transcendental functions, which are not contained directly in the Omikron Basic command set, a procedure for fast Fourier transform is also available as well as a very good differential equation solver and a variety of interpolation procedures.
Of course, it is impossible to meet all of the wishes and demands of the different user groups at all times, but we always try to consider your wishes and improvement suggestions in future versions of this program.
|1.1 System Requirements
The Library does not make any special demands on your computer. Of course, you do need Omikron Basic 6 and an Apple computer with PowerPC processor to be able to use the Library.
To use the Numeric Library in your programs, you have to additionally merge it into your program with the menu option 'Merge LIBRARY ...' from the 'Edit' menu of the Omikron Basic editor. The Numeric Library is stored with a special coding technique (token code), which enables Omikron Basic to load the Library especially fast.
The Library will be added to the end of your program where it is visible as:
|LIBRARY CODE Numeric 'Version X.YZ, DD.MM.JJJJ|
|The line containing the LIBRARY CODE
cannot be modified. At most, you can delete the line ([Alt] + [Delete]). This removes the Library from your program.
Your subsequent action should be to click on 'Program/Clean Sweep' in the editor to remove the now superfluous
Numeric Library variables from the table.
If you are writing new programs, it is best to load the Library first and then to write the program. This gives you the opportunity to test the program right away.
You may copy the Numeric Library for your own use as often as desired. You may copy it to the hard drive or save it to each working floppy disk. However, you have to make sure that neither copies nor originals ever fall into the hands of third parties; in the end, you are responsible for any generated pirated copies.
If you want to distribute programs that require the Numeric Library, you have make sure that the Library is protected against any misuse by third parties. It is best to distribute only compiled programs, because neither the source code of your program nor the Library itself can be reconstructed from a compiled program.
1.4 Hotline, Reporting Errors/Bugs, and Suggestions
|1.5 Information about Using the Library
-Before you use any of the Numeric Library functions, you have to initialize the Library by calling the procedure Num_Init.
- Numerical methods depend on the accuracy of the used numbers. To achieve good results, all Numeric Library procedures work with double precision. However, it is always possible to receive completely false results. Rounding errors and method-related errors (e.g., wrong stepsize when solving differential equations) can accumulate and produce quite unusable results. This means you should always check whether the results are plausible and, if needed, use different methods for the same problem and compare the results.
- Most of the Numeric Library functions and procedures are executed very rapidly. A discrete Fourier transformation with millions of elements or solving an extremely large equation system, however, will require the corresponding amount of time for the calculation.
- If data fields are passed to procedures or functions, then you have to indicate the address of the desired field by applying the address operator to the field, e.g., &Array#(,) or VARPTR(Array#(0,0)).
|- Use only floating point numbers with double precision for fields to be passed to Numeric Library
- If the fields in question are actually only a subfield, then this is indicated in the first and last index with the use of a colon in between. For example, X#(1:5,2)means that all data of the field X# is meant to be set with the first index between 1 and 5 and the second index as 2. Of course, this is not a valid BASIC representation but rather serves only the description in the manual.
- The counting in case of fields always starts with the element 0 (zero). This is in contrast to some of the routines known to you from, e.g., the programming language FORTRAN. This means that a field dimensioned to N contains N+1 elements and has to be remembered especially when fields are to be passed to the Numeric Library routines.
-The procedure description in the manual shows a prefixed "R" for some of the parameters. This indicates that the Numeric Library procedure returns a value. At this point, you have to indicate a variable and not a numeric expression. Of course, omit the "R" when calling a procedure.
|-Parts in square brackets are optional and may be omitted.
-If variables or functions do not have a postfix, then it always deals with the long integer type.
-Functions and procedures of the Numeric Library are written in Courier New bold.
-If you would like to try out the sample programs, you have to add a few additional COMPILER control words to the beginning of your programs as depicted in the programs contained in the DEMO folder.
To run the sample programs of the manual, it is best to follow these instructions: Load one of the sample programs from the DEMO folder into the Omikron Basic editor. Delete the program code with the exception of the COMPILER control words and the line containing the Library. Then copy the sample code and add it to the BASIC programs, inserting it between the COMPILER control words and the LIBRARY CODE line. Now use 'Compile & Run' to try out the program.
Omikron Basic on the Internet: http://www.berkhan.de
Copyright 1998-1999 by Berkhan-Software