HELP Sep. 15, 1984 F77/IMSL_LIB IMSL Library of Mathematical and Statistical Procedures The IMSL library, which includes over 500 Fortran callable sub- routines, is available for VAX UNIX. There are both single and double precision versions; check with your system administrator to see if your system has the IMSL library and how to access it. The rest of this write-up discusses assumes you have the double precision version. While IMSL includes mainly mathematical and statistical routines, chapter U of the library includes utility routines for printing histograms, for plotting functions, and for printing arrays. To use the double precision version, specify '-limsld' to f77: f77 prog.f -limsld (You may need to use fort instead of f77 on some systems. If so, you may also need to remove all .o and .a files before recompiling.) The IMSL manual includes an introduction, table of contents and permuted index at the beginning of volume 1. New users of IMSL should read sections 5.2 through 5.6.1 (about 5 pages) of the in- troduction before using the library. If IMSL does not contain an appropriate subroutine for what you are doing, see "help f77 li- braries" for information on other libraries. Most of the library is written using double precision variables. To see if a specific routine expects single or double precision arguments, look in the manual for the 'PRECISION/HARDWARE' infor- mation. If it specifies 'DOUBLE/H32' or 'SINGLE AND DOUBLE/H32' then floating point arguments must be double precision, if it specifies 'SINGLE/H32' or 'SINGLE/ALL' then floating point argu- ments must be single precision. The manual is written as if all the subroutines expect single precision arguments. Generally, for the double precision version of the library, you will have to supply double precision argu- ments. If you have written your program in single precision, see "help f77 to_double" to see what changes are needed to use double precision. There are five common errors in using IMSL routines: 1. Using single precision when double precision is required. 2. Not checking the error flag. Most routines have an error flag that IMSL sets to an error value when something goes wrong; it is your responsibility to check it. 3. Omitting arguments. IMSL routines often have many arguments that are required even if you don't use the result. 4. Not dimensioning arguments. Especially make sure work areas are appropriately dimensioned. 5. Supplying incorrect 'row dimension' of matrices. Many IMSL routines have a calling sequence of the form: call sub( a, nr, nc, ia, ... ) where 'a' is a matrix, 'nr' is it's row order, 'nc' is it's column order, and 'ia' is it's row dimension. The orders 'nr' and 'nc' are the number of rows and columns being used, while 'ia' is the row dimension of the matrix exactly as specified in the dimension statement in the calling program. The row order and row dimension are often different and must be specified correctly.