The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. It is free software under the GNU General Public License.
The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting. There are over 1000 functions in total with an extensive test suite.
The current version is GSL-1.8. It was released on 10 April 2006. This is a stable release.
The complete range of subject areas covered by the library includes,
Complex Numbers | Roots of Polynomials | Special Functions |
Vectors and Matrices | Permutations | Sorting |
BLAS Support | Linear Algebra | Eigensystems |
Fast Fourier Transforms | Quadrature | Random Numbers |
Quasi-Random Sequences | Random Distributions | Statistics |
Histograms | N-Tuples | Monte Carlo Integration |
Simulated Annealing | Differential Equations | Interpolation |
Numerical Differentiation | Chebyshev Approximation | Series Acceleration |
Discrete Hankel Transforms | Root-Finding | Minimization |
Least-Squares Fitting | Physical Constants | IEEE Floating-Point |
Discrete Wavelet Transforms |
Unlike the licenses of proprietary numerical libraries the license of GSL does not restrict scientific cooperation. It allows you to share your programs freely with others.
Here is a screenshot of some GSL code (png, 14k).
GSL can be found in the subdirectory /gnu/gsl/
on your favorite
GNU mirror.
For other ways to obtain GSL, please read How to get GNU Software
Installation instructions can be found in the included README and INSTALL files.
Precompiled binary packages are included in most GNU/Linux distributions.
A compiled version of GSL is available as part of Cygwin on Windows (but we recommend using GSL on a free operating system, such as GNU/Linux).
Commercially-supported versions of GSL are available for all platforms on CD from Network Theory Ltd -- sales support the development of GSL.
The GSL Reference Manual is available online,
The manual has been published as a printed book (under the GNU Free Documentation License),GNU Scientific Library Reference Manual - Revised Second Edition,
M. Galassi et al, ISBN 0954161734 (paperback) RRP $39.99.
All the money raised from the sales of the manual helps to support the development of GSL --- see www.network-theory.co.uk for ordering information.
GSL is developed on the following platforms,
It has been reported to compile on the following other platforms,
We require that GSL should build on any UNIX-like system with an ANSI C compiler, so if doesn't, that's a bug and we would love a patch!
If you have found a bug, please report it to bug-gsl@gnu.org.
Bug reports for the GNU Scientific Library should be sent to the Bug-gsl <bug-gsl@gnu.org> mailing list.
If you have questions about installation, how GSL works and how it is used, or general questions concerning GSL, you can send an e-mail to the Help-gsl <help-gsl@gnu.org> mailing list.
Announcements of new releases are made on the read-only Info-gsl <info-gsl@gnu.org> mailing list.
Follow the links to the individual mailing lists above to subscribe or view the list archives.
Here are some of the main benefits of using a free scientific library under the GNU General Public License,
The library uses an object-oriented design. Different algorithms can be plugged-in easily or changed at run-time without recompiling the program.
It is intended for ordinary scientific users. Anyone who knows some C programming will be able to start using the library straight-away.
The interface was designed to be simple to link into very high-level languages, such as GNU Guile or Python
The library is thread-safe.
Where possible the routines have been based on reliable public-domain Fortran packages such as FFTPACK and QUADPACK, which the developers of GSL have reimplemented in C with modern coding conventions.
The library is easy to compile and does not have any dependencies on other packages.
The reasons why the GNU Project uses the GPL are described in the following articles:
Some answers to common questions about the license:
If I write an application which uses GSL am I forced to distribute that application?
No. The license gives you the option to distribute your application if you want to. You do not have to exercise this option in the license.If I wanted to distribute an application which uses GSL what license would I need to use?
The GNU General Public License (GPL).
The bottom line for commercial users:
GSL can be used internally ("in-house") without restriction, but only redistributed in other software that is under the GNU GPL.
If you would like to refer to the GNU Scientific Library in a journal article, the recommended way is to cite the reference manual, e.g. M. Galassi et al, GNU Scientific Library Reference Manual (2nd Ed.), ISBN 0954161734.
If you want to give a url, use "http://www.gnu.org/software/gsl/".
The development webpage for GSL is at http://sources.redhat.com/gsl/devel.html.
This site also contains the gsl-discuss development mailing list archives (discussion archive).
GSL requires a BLAS library for vector and matrix operations. The default CBLAS library supplied with GSL can be replaced by the tuned ATLAS library for better performance,
ATLAS is free software and its license is compatible with the GNU GPL.
Other packages that are useful for scientific computing are:
Both of these packages are free software (GNU GPL).
The following third-party packages provide extensions to GSL.
If you want to add a feature to GSL we recommend that you make it an extension first. We will list it here so that people can try it out. Extensions can be incorporated after they have been tested in real use (see "How to help" for more information).
Other packages:
Some applications using GSL that we know of:
Wrappers for Other Languages (not necessarily complete):
Textbooks:
A textbook on numerical physics, covering classical mechanics, electrodynamics, optics, statistical physics and quantum mechanics. The example programs in the book use the GNU Scientific Library and are free software (the source code is included on a CDROM with the book).
Further information about this book is available from the publisher at Springer.de.
The project was conceived in 1996 by Dr M. Galassi and Dr J. Theiler of Los Alamos National Laboratory.
They were joined by other physicists who also felt that the licenses of existing libraries were hindering scientific cooperation.
Most of the library has been written by a relatively small number of people with backgrounds in computational physics in order to provide a consistent and reasonably-designed framework.
Overall development of the library and the design and implementation of the major modules was carried out by Dr G. Jungman and Dr B. Gough. Modules were also written by Dr J. Davies, R. Priedhorsky, Dr M. Booth, and Dr F. Rossi, along with many useful contributions from others in the user community. Debian packages for the library are maintained by Dr D. Eddelbuettel.
GSL itself is largely feature complete with a stable API, the developers are not actively working on any major new functionality.
The main emphasis is on ensuring the stability of the existing functions, tidying up and fixing any bugs that are reported. Potential contributors are encouraged to gain familiarity with the library by investigating and fixing known problems listed in the 'BUGS' file.
To maintain stability, any new functionality is encouraged as packages, built on top of GSL and maintained independently by their authors, as in other free software projects. The design of GSL permits extensions to be used alongside the existing library easily by simple linking.
Further details are available at the development webpage
Any comments from experts in numerical analysis would be welcome. Discussions about the development of the library take place on the mailing list gsl-discuss@sources.redhat.com.
Purchasing printed copies of the GSL manual or GSL support from Network Theory Ltd helps fund the development of the library. These are provided by Brian Gough, one of the developers of GSL.
You can support the GNU Project and the Free Software Foundation by becoming an associate FSF member:
Membership benefits include regular newsletters, discounts on GNU merchandise, a business-card sized GNU/Linux rescue CD and more (full list).
FAIL: herm(10), direct eigenvalue(7), unsorted (-0.0545196117924558465 observed vs -0.0545196117924556592 expected) [1744]
gsl_sf_exp.h:143: error: floating constant exceeds range of 'float'IEEE control with gsl_ieee_utils is not supported.
Return to GNU's home page.
Please send FSF & GNU inquiries & questions to gnu@gnu.org. There are also other ways to contact the FSF.
Please send comments on these web pages to webmasters@gnu.org, send other questions to gnu@gnu.org.
Copyright (C) 2006 Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
Updated: $Date: 2006/07/17 15:44:16 $ $Author: bjg $