
The GNU Scientific Library, gsl, is a collection of numerical routines for scientific computing in C and C++.
Last update: Fri Nov 23 07:04:57 2001
Comments, and reports of errata or bugs, are welcome via email to the author, Nelson H. F. Beebe <beebe@math.utah.edu>. In your report, please supply the full document URL, and the title and Last update time stamp recorded near the top of the document.
Most of the scientific libraries available at this site are written in Fortran, and usable from other programming languages, such as C and C++, subject to careful consideration of mixedlanguage programming issues. GSL is different: it is written entirely in Standard C (and thus also usable from C++), and makes heavy use of header files, C typedefs, and other C data types and data structures that have no counterparts in Fortran. GSL uses the C storage order for multidimensional arrays, which differs from that used by Fortran. The only way that you can use this library from Fortran code is to write your own wrapper routines in C to provide the necessary mapping between data types, data structures, and data storage conventions of the two languages. No such interface layer is included with the library. The GSL software distribution TODO list contains wishlist items calling for interfaces to guile (the GNU implementation of Scheme, a simplified derivative of Lisp) and python to be developed, but is completely silent about support for Fortran.
There is locallyprovided online documentation for GSL inside the GNU Emacs info system. In emacs, type Ch i to enter the info system, then type Mgslref for the GSL Reference Manual, or Mgsldesign for the GSL Design Manual. You can do the same thing in the standalone xinfo viewer. That documentation is also available in HTML form for the GSL Design Manual and the GSL Reference Manual for Web browsers.
C code can be linked with the GSL libraries like this:
cc o ccode ccode.f L/usr/local/lib lgsl lcblas
There are related several libraries whose source code is freely available, among them, EISPACK (for matrix eigenvalues and eigenvectors, and singularvalue decompositions), LINPACK (for linear equations, leastsquares, and singularvalue decomposition), MINPACK (for function minimization and leastsquares solutions), and LAPACK (for linear equations, leastsquares, singularvalue decomposition, and eigenvalue/eigenvector solution).