IMSL - Mathematical Subroutine Library

IMSL is a library containing approximately 1300 mathematical, numerical and statistical subroutines. It is written in Fortran but is easily called from C. It is comprehensive, efficient, stable, and reliable. IMSL is the subroutine library of choice by the majority of engineers. The IMSL library is locally available on the IUS Suns.

To find out about the functions offered by IMSL you must check the references mentioned in this document. There is no man page for IMSL.


Table of Contents

Examples

To compile with the IMSL Library, include the library flags -lmath -lF77 when compiling. For example:
cc -o program program.o -lmath -lF77 ${LIBS}
NOTE: No C include file is required for files making IMSL calls.

To call an IMSL subroutine or any other Fortran function from a C function, you must follow the following conventions:

  • Fortran to C datatype conversion:
    	C		FORTRAN
    	---------	----------------
    	char		CHARACTER
    	short int	INTEGER*2
    	long int	INTEGER
    	float		REAL
    	double		DOUBLE PRECISION
    	struct {	COMPLEX
    	 float r,i;}	
    
  • When calling IMSL routine XXXXX(), the C call is in lowercase followed by an underscore, i.e., xxxxx_().
  • All arguments to a Fortran function are call by address, e.g., for IMSL function XXXXX(a) where a is an INTEGER, the C call would be

    	int a;
    	xxxxx_(&a);
    
  • All Fortran arrays are stored in column-major order which is opposite of C storage order.
  • If the compiler you're using complains about not finding _MAIN_ try adding the following just before your function main. (This kludge was brought to my attention by Stephane Laveau).
         #ifdef IMSL
         void MAIN_(void) {}
         #endif /*IMSL*/
    
  • References

    Manuals available in the E&S and VASC Libraries:

        IMSL MATH/LIBRARY User's Manual, Vol 1-3. (QA76.73 in NIST
        Gaithersburg Research Information Center, Admin E-120) IMSL
        Inc., Houston, TX, 1987.
    
        IMSL STAT/LIBRARY User's Manual, Vol 1-3. (QA76.73 in NIST
        Gaithersburg Research Information Center, Admin E-120) IMSL
        Inc., Houston, TX, 1987.
    
    Distributor: Visual Numerics Inc., 9990 Richmond Ave, Suite 400, Houston,
                 TX 77042-4548 (support@imsl.com)
    

    VASC Contact

    Mark Wheeler


    10/28/94 Created by Mark Wheeler mdwheel@cmu.edu
    This page has been accessed [count] times.