A Mathematical Library

SLATEC is a FORTRAN90 library which contains a large amount of numerical software.

The orignal, correct version of SLATEC is as a FORTRAN77 library. This library is available through NETLIB:

What you are seeing here is a version of the library that I have lightly edited; a few changes have been made so that it will compile as a FORTRAN90 program. However, this version is not an official version, it is not supported by anybody, and if you have any doubts about its accuracy, you should refer to the original, correct FORTRAN77 version!

The huge size of the SLATEC library is both a plus (it has everything) and a minus (there's so much here I can't find what I'm looking for!) Since SLATEC is built, in large part, from a number of smaller, specialized libraries, I would strongly recommend that if your interests lie entirely within one of those libraries, you try to find a copy of that library!

Another issue to keep in mind is the extraordinary complexity of some of the routines. It is not unusual for a single routine in the SLATEC library to call, directly or indirectly, thirty or forty routines. In part, this is a testimony to the modularity of the routines; however, it can make debugging a nightmare.

SLATEC includes all or some of the following libraries:

Some more information about the SLATEC library is available in


SLATEC is available in a FORTRAN90 version.

Related Data and Programs:

BLAS, a FORTRAN90 library which contains the Basic Linear Algebra Subprograms (BLAS) for level 1, 2 and 3, for single and double precision, and for real and complex arithmetic.

DLAP, a FORTRAN90 library which carries out the iterative solution of sparse linear systems, by Anne Greenbaum and Mark Seager.

EISPACK, a FORTRAN90 library which carries out eigenvalue computations; superseded by LAPACK;

FFTPACK5, a FORTRAN90 library which implements the Fast Fourier Transform (FFT) by Paul Swarztrauber and Dick Valent;

LINPACK, a FORTRAN90 library which contains linear algebra routines.

MACHINE, a FORTRAN90 library which contains integer, single precision real and double precision real machine constants, and is included in SLATEC.

MINPACK, a FORTRAN90 library which solves systems of nonlinear equations, or the least squares minimization of the residual of a set of linear or nonlinear equations.

NMS, a FORTRAN90 library which includes a wide variety of numerical software, including solvers for linear systems of equations, interpolation of data, numerical quadrature, linear least squares data fitting, the solution of nonlinear equations, ordinary differential equations, optimization and nonlinear least squares, simulation and random numbers, trigonometric approximation and Fast Fourier Transforms.

PPPACK, a FORTRAN90 library which contains cubic spline and general piecewise polynomial interpolation routines, included in SLATEC.

QUADPACK, a FORTRAN90 library which approximates integrals by numerical quadrature, included in SLATEC.

XERROR, a FORTRAN90 library which is designed to report and handle errors detected during program execution.


  1. Richard Brent,
    A FORTRAN Multiple-Precision Arithmetic Package,
    ACM Transactions on Mathematical Software,
    Volume 4, Number 1, March 1978, pages 71-81.
  2. Richard Brent,
    Algorithm 524: MP: A FORTRAN Multiple-Precision Arithmetic Package,
    ACM Transactions on Mathematical Software,
    Volume 4, Number 1, March 1978, pages 57-70.
  3. Bill Buzbee,
    The SLATEC Common Math Library,
    in Sources and Development of Mathematical Software,
    edited by Wayne Cowell,
    Prentice-Hall, 1984,
    ISBN: 0-13-823501-5,
    LC: QA76.95.S68.
  4. Carl deBoor,
    A Practical Guide to Splines,
    Springer, 2001,
    ISBN: 0387953663,
    LC: QA1.A647.v27.
  5. Jack Dongarra, Jim Bunch, Cleve Moler, Pete Stewart,
    LINPACK User's Guide,
    SIAM, 1979,
    ISBN13: 978-0-898711-72-1.
  6. Kirby Fong, Thomas Jefferson, Tokihiko Suyehiro, Lee Walton,
    Guide to the SLATEC Common Mathematical Library,
    April 10, 1990.
  7. Phyllis Fox, Andrew Hall, Norman Schryer,
    Algorithm 528:
    Framework for a Portable Library,
    ACM Transactions on Mathematical Software,
    Volume 4, Number 2, June 1978, page 176-188.
  8. Fred Fritsch, Ralph Carlson,
    Monotone Piecewise Cubic Interpolation,
    SIAM Journal on Numerical Analysis,
    Volume 17, Number 2, April 1980, pages 238-246.
  9. Charles Gear,
    Numerical Initial Value Problems in Ordinary Differential Equations,
    Prentice-Hall, 1971,
    ISBN: 0136266061,
    LC: QA372.G4.
  10. Ron Jones, David Kahaner,
    XERROR, The SLATEC Error Handling Package,
    Technical Report SAND82-0800,
    Sandia Laboratories, 1982.
  11. David Kahaner, Cleve Moler, Steven Nash,
    Numerical Methods and Software,
    Prentice Hall, 1989,
    ISBN: 0-13-627258-4,
    LC: TA345.K34.
  12. Charles Lawson, Richard Hanson, David Kincaid, Fred Krogh,
    Algorithm 539: Basic Linear Algebra Subprograms for Fortran Usage,
    ACM Transactions on Mathematical Software,
    Volume 5, Number 3, September 1979, pages 308-323.
  13. Jorge More, Burton Garbow, Kenneth Hillstrom,
    User Guide for MINPACK-1,
    Technical Report ANL-80-74,
    Argonne National Laboratory, 1980.
  14. Robert Piessens, Elise deDoncker-Kapenga, Christian Ueberhuber, David Kahaner,
    QUADPACK: A Subroutine Package for Automatic Integration,
    Springer, 1983,
    ISBN: 3540125531,
    LC: QA299.3.Q36.
  15. Mark Seager,
    A SLAP for the Masses,
    Technical Report UCRL-100267,
    Lawrence Livermore National Laboratory, December 1988.
  16. Paul Swarztrauber,
    Vectorizing the FFT's,
    in Parallel Computations,
    edited by Garry Rodrigue,
    Academic Press, 1982,
    ISBN: 0125921012,
    LC: QA76.6.P348.
  17. James Wilkinson, Christian Reinsch,
    Handbook for Automatic Computation,
    Volume II, Linear Algebra, Part 2,
    Springer, 1971,
    ISBN: 0387054146,
    LC: QA251.W67.

Source Code:

Examples and Tests:

AIRY_PRB just calls some routines that evaluate the Airy function.

SLATEC_PRB is a large program that performs a lot of tests on the routines.

MACHINE_PRB just calls the routines from the MACHINE library.

List of Routines:

You can go up one level to the FORTRAN90 source codes.

Last revised on 29 March 2007.